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
I searched existing issues before opening this one
Expected behavior
When there is network created without gateway specified, the attached network wont have the gateway
Actual behavior
There is always gateway IP created from subnet range.
This became significant problem, when you try to connect container to multiple networks and only from proper one the gateway shall be used.
Steps to reproduce the behavior
$docker network create test-network --subnet 10.10.0.0/16
$docker network inspect test-network # <- there wont be gateway
$docker run --rm -it --network=test-network ubuntu-debootstrap ip route show
default via 10.10.0.1 dev eth0 # <- this is totally unexpected
10.10.0.0/16 dev eth0 proto kernel scope link src 10.10.0.2
Output of docker version:
Client:
Version: 18.09.1
API version: 1.39
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:35:23 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.1
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:02:44 2019
OS/Arch: linux/amd64
Experimental: false
Output of docker info:
Containers: 8
Running: 8
Paused: 0
Stopped: 0
Images: 85
Server Version: 18.09.1
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 local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 96ec2177ae841256168fcf76954f7177af9446eb
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-43-generic
Operating System: Ubuntu 16.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 15.56GiB
Name: some.host.domain.net
ID: KGJP:WWP4:YK7H:I3JA:KEZW:X3JY:PQ7M:7PAP:HNR2:G5UI:QOI2:JL6Q
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
Product License: Community Engine
WARNING: API is accessible on http://0.0.0.0:2376 without encryption.
Access to the remote API is equivalent to root access on the host. Refer
to the 'Docker daemon attack surface' section in the documentation for
more information: https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
The text was updated successfully, but these errors were encountered:
I don't have much to add, other than I have this same issue. For my use case, I am able to use veth pairs without a docker network as a workaround -- this would be a nice thing to have as a standard docker feature as well, but being unable to create a network without a gateway does seem like a bug.
Creating a network without a gateway might not be possible according to docker network inspect - but when you create a network with the flag --internal and also connect networks that have specifically defined a --gateway docker will set the gateway to that network.
Expected behavior
When there is network created without gateway specified, the attached network wont have the gateway
Actual behavior
There is always gateway IP created from subnet range.
This became significant problem, when you try to connect container to multiple networks and only from proper one the gateway shall be used.
Steps to reproduce the behavior
Output of
docker version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: