-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Description
Steps to reproduce the issue:
-
Create two networks:
docker network create test docker network create test2 -
Try to run a container attached to both networks and output the IPs:
docker run -it --rm --network test --network test2 busybox ip a
Describe the results you received:
There is only one network present (apart from the loopback one). Example output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
45343: eth0@if45344: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue
link/ether 02:42:ac:16:00:02 brd ff:ff:ff:ff:ff:ff
inet 172.22.0.2/16 scope global eth0
valid_lft forever preferred_lft forever
Describe the results you expected:
There should be three interfaces (including loopback) including the two networks specified.
Additional information you deem important (e.g. issue happens only occasionally):
docker run seems to only take into account the last network specified at the commandline.
Output of docker version:
Client:
Version: 17.10.0-ce
API version: 1.33
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:04:16 2017
OS/Arch: linux/amd64
Server:
Version: 17.10.0-ce
API version: 1.33 (minimum version 1.12)
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:02:56 2017
OS/Arch: linux/amd64
Experimental: false
Output of docker info:
Containers: 5
Running: 4
Paused: 0
Stopped: 1
Images: 8
Server Version: 17.10.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: novju2obbkwighigowx8slr76
Is Manager: true
ClusterID: 2dbj37zxgyf0iv9pk0ncozg6f
Managers: 1
Nodes: 3
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: 192.158.50.11
Manager Addresses:
192.158.50.11:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 0351df1c5a66838d0c392b4ac4cf9450de844e2d
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-98-generic
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 992.1MiB
Name: longhorn-01
ID: FS4U:GCWE:MPIQ:EFZU:Y43S:GCLM:PQX3:PYHR:5BIY:A4KA:Q5GU:TNVV
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
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.):
This is on Ubuntu 16.04, but the same happens on Arch Linux as well. Tested on Docker swarm hosts only.