-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Description
Updating to docker-ce 19.03.9 breaks DNS resolution inside compose managed stack.
Steps to reproduce the issue:
Test docker-compose.yml file:
version: "3.7"
services:
centos:
image: "centos:7"
init: true
tty: true
networks:
test:
networks:
test:
Start with docker-compose up -d
Run docker-compose exec centos ping -c 4 bbc.co.uk
Describe the results you received:
ping: bbc.co.uk: Name or service not known
Describe the results you expected:
PING bbc.co.uk (151.101.192.81) 56(84) bytes of data.
64 bytes from 151.101.192.81 (151.101.192.81): icmp_seq=1 ttl=58 time=10.8 ms
64 bytes from 151.101.192.81 (151.101.192.81): icmp_seq=2 ttl=58 time=29.7 ms
64 bytes from 151.101.192.81 (151.101.192.81): icmp_seq=3 ttl=58 time=12.2 ms
64 bytes from 151.101.192.81 (151.101.192.81): icmp_seq=4 ttl=58 time=11.0 ms
--- bbc.co.uk ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 6045ms
rtt min/avg/max/mdev = 10.887/15.981/29.704/7.941 ms
(The above output was obtained after rolling back docker engine to 19.03.8. No other packages were modified).
Output of docker version:
Client: Docker Engine - Community
Version: 19.03.9
API version: 1.40
Go version: go1.13.10
Git commit: 9d988398e7
Built: Fri May 15 00:25:18 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.9
API version: 1.40 (minimum version 1.12)
Go version: go1.13.10
Git commit: 9d988398e7
Built: Fri May 15 00:23:50 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
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: 13
Running: 9
Paused: 0
Stopped: 4
Images: 149
Server Version: 19.03.9
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 173
Dirperm1 Supported: 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: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-101-generic
Operating System: Ubuntu 18.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.667GiB
Name: diablos
ID: VTPB:4JKM:NQFD:5PGF:J5LJ:CLSR:ZWBL:M4MN:BLJL:3APJ:XGAZ:FMYA
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
WARNING: the aufs storage-driver is deprecated, and will be removed in a future release.
Output of docker version in working state (ie, rolled back):
Client: Docker Engine - Community
Version: 19.03.9
API version: 1.40
Go version: go1.13.10
Git commit: 9d988398e7
Built: Fri May 15 00:25:18 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b7f0
Built: Wed Mar 11 01:24:19 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
Output of docker info in working state (ie, rolled back):
Client:
Debug Mode: false
Server:
Containers: 13
Running: 9
Paused: 0
Stopped: 4
Images: 149
Server Version: 19.03.8
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 173
Dirperm1 Supported: 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: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-101-generic
Operating System: Ubuntu 18.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.667GiB
Name: diablos
ID: VTPB:4JKM:NQFD:5PGF:J5LJ:CLSR:ZWBL:M4MN:BLJL:3APJ:XGAZ:FMYA
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
WARNING: the aufs storage-driver is deprecated, and will be removed in a future release.
Additional info
My /etc/resolv.conf file on host contains two nameserver entries. 192.168.5.1 (which is the host machine's own ip address, and is where a dnsmasq server is running) and 127.0.0.1.
daemon.json contains "dns": ["192.168.5.1","8.8.8.8"].
Running without docker-compose works fine. Ie:
$ docker run centos:7 ping -c 4 bbc.co.uk
PING bbc.co.uk (151.101.128.81) 56(84) bytes of data.
64 bytes from 151.101.128.81 (151.101.128.81): icmp_seq=1 ttl=58 time=11.1 ms
64 bytes from 151.101.128.81 (151.101.128.81): icmp_seq=2 ttl=58 time=13.0 ms
64 bytes from 151.101.128.81 (151.101.128.81): icmp_seq=3 ttl=58 time=13.8 ms
64 bytes from 151.101.128.81 (151.101.128.81): icmp_seq=4 ttl=58 time=11.8 ms
--- bbc.co.uk ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 11.170/12.489/13.829/1.044 ms
works in both versions.
Using docker-compose 1.25.5 in all cases.