I believe docker is less functional because SHELL variables take precedence over .env files or --env-file
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
First of all I want to say that I may not be aware of every way to deal with this problem, but as far as I've seen it makes no sense to me.
I have just switched to the new docker compose command to find out, that the precedence of environment files changed around a couple of years ago. I have a docker-compose.yml that expect a DENO_PORT environment variable from the .env file to start a Deno app inside the container using the ports 5000:5000. Now, while I am updating the application locally, I need to start the same app in a different port with live reloading. The Application is expecting to get the port from the environment variable DENO_PORT, so... If I set DENO_PORT to 5001 in zshrc and to 5000 in the .env file, it doesn't work anymore. Now it's always the port 5001, I can't have the same variable with different values between my host and my containers, how is that a good idea? Why is it a good practice to have exactly the same?
How is it possible that now I need two variables to accomplish the same thing? Is there something I am missing? How is this better for other user cases?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the docker compose command, a docker-compose.yml, a .env file, --env-file, and DENO_PORT set in zshrc. Trace how Docker CLI resolves these environment sources and compare the observed precedence with the reporter's expected behavior. The issue does not define an agreed change or a concrete completion criterion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100