Skip to content

name ignored on networks when using docker stack deploy  #2734

Description

@tim3trick

Description
I have the following yml (foo.yml):

version: "3.8"services:
dummy:
image: hello-worldnetworks:
- network1-${TICKET}networks:
network1-${TICKET}:
driver: overlayname: network1-${TICKET}

TICKET = "latest" (set either via portainer, or $ export TICKET=latest)
But docker stack deploy --compose-file=foo.yml foo leads to:

Creating network foo_network1-latest
service dummy: undefined network "network1-latest"

Steps to reproduce the issue:

  1. Use the yml provided

Describe the results you received:

Creating network foo_network1-latest
service dummy: undefined network "network1-latest"

Describe the results you expected:

Creating network network1-latest
Creating service foo_dummy"

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:02:55 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:01:25 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683

Output of docker info:

Client:
Debug Mode: false
Server:
Containers: 5
Running: 3
Paused: 0
Stopped: 2
Images: 18
Server Version: 19.03.13
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
NodeID: *******
Is Manager: true
ClusterID: *******
Managers: 1
Nodes: 5
Default Address Pool: 10.0.0.0/8 SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: *******
Manager Addresses:
*******:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.19.0-10-amd64
Operating System: Debian GNU/Linux 10 (buster)
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 62.84GiB
Name: swarm01
ID: U6J4:FJC2:OG6D:GXOY:JOSM:2RYX:OU3A:FORA:37TU:2X4D:3JTC:V3XK
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support

Additional environment details (AWS, VirtualBox, physical, etc.):
docker is installed natively as described in the docs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions