Repository navigation
docker stack deploy ignores the name option for networks #938
Copy link
Copy link
Closed
Labels
Description
Description
docker stack deploy ignores the name option for networks introduced in 3.5, instead uses the usual name.
Docs :
Set a custom name for this network. The name field can be used to reference networks which contain special characters. The name is used as is and will not be scoped with the stack name.
Steps to reproduce the issue:
- docker compose file
compose.yml
version: '3.5'
services:
hello-world:
image: hello-world
networks:
- network1
- network3
networks:
network1:
name: network2
network3:
- run
docker stack deploy -c compose.yml mystack
Describe the results you received:
A network named mystack_network1.
Describe the results you expected:
A network named network2.
I would like to use the network in a different compose file, independent of the stack name. For volumes, this feature works like the docs say (introduced already in 3.4), but I can't get it running for networks.
Output of docker version:
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:11:19 2017
OS/Arch: linux/amd64
Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:09:53 2017
OS/Arch: linux/amd64
Experimental: false
Output of docker info:
Containers: 61
Running: 0
Paused: 0
Stopped: 61
Images: 9
Server Version: 17.12.0-ce
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 macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
NodeID: ieqn3yuqf366kw0yemexbe12j
Is Manager: true
ClusterID: jem52nrfq80jwpy430iq6sibc
Managers: 3
Nodes: 8
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 141.52.39.115
Manager Addresses:
141.52.39.115:2377
141.52.39.122:2377
141.52.39.123:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-112-generic
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.953GiB
Name: prototype-1
ID: YJB2:4RWH:JORN:KAKB:GYTB:UMRQ:YOZX:R7O6:ELDB:ZH7B:LVZH:WEPX
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): 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
Reactions are currently unavailable
Activity
tianon commentedon Jul 27, 2018
Currently, the docs imply that this new
name:field for networks should work on 18.03, but due to this issue it doesn't actually work until 18.04+ -- is that something that ought to be updated?thaJeztah commentedon Jul 28, 2018
Hm good one; I see the fix was backported to 18.03 EE, but doesn't look like it landed in 18.03 CE
thaJeztah commentedon Jul 28, 2018
/cc @TFox ^^
thaJeztah commentedon Jul 28, 2018
whoops, wrong handle, meant @tfoxnc