Answers for "docker postgres create database"

38

create postgres database

sudo -u postgres psql
postgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;
Posted by: Guest on September-01-2020
9

docker postgres

$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
Posted by: Guest on September-17-2020
1

how to recreate postgres database in docker

docker compose down
docker compose up --force-recreate
Posted by: Guest on June-03-2021
3

create database postgres

createdb -h localhost -p 5432 -U postgres testdb
password ******
Posted by: Guest on December-15-2020
1

docker create postgres db

# inside Dockerfile
COPY your_sql_file.sql /docker-entrypoint-initdb.d/
Posted by: Guest on January-04-2021

Code answers related to "docker postgres create database"

Browse Popular Code Answers by Language