-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
We have docker compose.yml
version: '2'
services:
postgres:
image: "library/postgres:latest"
environment:
- POSTGRES_USER=test
- POSTGRES_PASSWORD=qwerty
- POSTGRES_DB=mydb
execute:
docker-compose up
docker exec -it <CONTAINER_ID> /bin/bash
psql -U test
and we get this error:
psql: FATAL: database "test" does not exist
Everything works fine witout compose
docker run -it -e POSTGRES_USER=test -e POSTGRES_PASSWORD=qwerty -e POSTGRES_DATABSE=mydb postgres
docker exec -it <CONTAINER_ID> /bin/bash
psql -U test
results:
root@cb18469bc86e:/# psql -U test
psql (10.1)
Type "help" for help.
test=#
bylek, tonsV2, Sharlaan, BojanKomazec, Mihoid and 20 more
Metadata
Metadata
Assignees
Labels
No labels