-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
env_file not working anymore in 'docker stack deploy' #4952
Comments
Yes, looks like the latest additions to the compose spec to allow specifying this as required are backward incompatible (or at least how it normalizes it) 🤔 Does it work it you use |
No I need to use it like as follows, example:
So I cannot use The question is, what is causes this error here? Is it the additional "required: true" element? |
Hm, but both
Yes; the schema used by |
I don't remember the needs exactly for using For example, it lacks the So I hope there will be a fix for `docker stack deploy' , similar to what has been done in a recent issue where also a compose change was not backwards compatible: #4859 |
This is probably related to: In todays Docker 25.0.5 the issue is fixed. But maybe you want to support the |
Description
So far, it was possible to pass docker compose config output to docker stack deploy without problems, as follows:
docker compose config | docker stack deploy -c - httpd
Now I upgraded to docker 25.0.4, and discovered corruption of
env_file
mapping. The tag is rendered as follows:And as a result, the following error prevents startup:
docker compose config | docker stack deploy -c - httpd
### Resulting error:
services.httpd.env_file.0 must be a string
This is very critical, it currently blocks all of our deployments that have an
env_file
.Reproduce
docker-compose.yml
:httpd.env
(content does not matter here):Precondition:
docker swarm init
Run:
docker compose config | docker stack deploy -c - httpd
Expected behavior
The container should simply start.
docker version
Client: Docker Engine - Community Version: 25.0.4 API version: 1.44 Go version: go1.21.8 Git commit: 1a576c5 Built: Wed Mar 6 16:32:14 2024 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 25.0.4 API version: 1.44 (minimum version 1.24) Go version: go1.21.8 Git commit: 061aa95 Built: Wed Mar 6 16:32:14 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.28 GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: