You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And when I execute docker stack deploy -c docker-compose.yml test_swarm2_stack I got some strange error ↓ services.web.ports array items[0,1] must be unique
Not sure if there's an issue with my yml.
Your YAML looks fine, it depends how you provide your variables. Values are probably empty because .env file is not loaded with docker stack deploy (unlike docker compose up, related issue with workarounds here: moby/moby#29133)
To properly load my vars, I use a .env file with export:
Description
Hi,
I'm trying to deploy service dynamically under docker swarm mode by docker compose yml and some variables. Here's my docker compose yml ↓
And when I execute
docker stack deploy -c docker-compose.yml test_swarm2_stack
I got some strange error ↓services.web.ports array items[0,1] must be unique
Not sure if there's an issue with my yml.
Reproduce
docker stack deploy -c docker-compose.yml test_swarm2_stack
Expected behavior
No response
docker version
Client: Cloud integration: v1.0.35+desktop.13 Version: 26.1.1 API version: 1.45 Go version: go1.21.9 Git commit: 4cf5afa Built: Tue Apr 30 11:44:56 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.30.0 (149282) Engine: Version: 26.1.1 API version: 1.45 (minimum version 1.24) Go version: go1.21.9 Git commit: ac2de55 Built: Tue Apr 30 11:48:04 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.31 GitCommit: e377cd56a71523140ca6ae87e30244719194a521 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: