I'm using Postgres and looking to create a database and then table after the container is created. Right now I using a dockerfile and init.sql file. The database gets created but the table gets created in the default postgres database. How do I get my new database to be the default one or at least get my table created in the correct database? Thank you
Dockerfile
FROM library/postgres
COPY init.sql /docker-entrypoint-initdb.d/
init.sql
CREATE DATABASE myApp;
CREATE TABLE session(sessionguid UUID NOT NULL, created text NOT NULL, sessionlife integer NOT NULL);