Join GitHub today
docker stack deploy ignores environment variables and replaces them with blank values #30251
Steps to reproduce the issue:
Describe the results you received:
The environment variables have been replaced with empty string values.
Describe the results you expected:
I would expect the command to either error if it isn't supported or I would expect it to replace the values in the compose file with the relevant environment variables.
Additional information you deem important (e.g. issue happens only occasionally):
Additional environment details (AWS, VirtualBox, physical, etc.):
Microsoft Azure VM
@samattridge could you share your
It does environment variable substitution on my 1.13 daemon.
For me it works in this case:
but not in this case:
Obviously I defined the env vars in all of the Swarm machines.
I'm seeing the same behavior as @cecchisandrone.
With this command:
A config like this will not set the environment variables on the container:
However, a config like this will work: