79506863

Date: 2025-03-13 15:16:18
Score: 6.5 🚩
Natty: 5.5
Report link

Sorry if I'm bringing this discussion up again but it's the only one on the web I've found that deals with this issue.

In the Docker documentation, it appears that ENV parameters defined in the Dockerfile are ignored if there is an environment section in the docker-compose file.

5 . Set in a container image in the ENV directive. Having any ARG or ENV setting in a Dockerfile evaluates only if there is no Docker Compose entry for environment, env_file or run --env.

My question is this: if there is an environment section in the docker-compose file, are the ENV parameters defined in the Dockerfile completely ignored or are they "combined/replaced" with those defined in the docker-compose file?

I would like to keep certain configuration parameters of a Timescale container (postgres) in the Dockerfile and add other configuration parameters in Docker-Compose to be modified "at runtime".

Thank you in advance

Best regards

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (0.5): Best regards
  • Blacklisted phrase (1): regards
  • RegEx Blacklisted phrase (3): Thank you in advance
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: mmjc23