Closed alfonsomunozpomer closed 1 year ago
There is nothing the PostgreSQL image/container can do with values not passed to it.
I would guess that compose is making the variables explicit to limit the scope of which containers have access to which values (and so users can map them to different names for each container).
docker-compose.yml
:This can be fixed by declaring (but not setting)
POSTGRES_PASSWORD
. I’ve raised an issue in the Docker Compose GitHub repo because this is due to--env-file
not behaving exactly the same as having an.env
file or usingenv_file
. I don’t know if this is though by design and maybe Postgres images could do something to fix it.