Docker Code: Can someone please take a look to tell me what is it that i am doing wrong

Every time I run this code to create a container with this image Postgres:9.4, the container exits immediately.

docker run -d --name=db postgres:9.4

1 Like

Hi @dsansie,

The postgres image require password environment variable to run correctly :

docker run -d --name=db -e -e POSTGRES_PASSWORD=mysecretpassword postgres:9.4