Hi, recently I cleaned out and my docker home directory to free up some space, upgraded docker to 20.10.17-ce ran docker and re-installed some containers (sonatype/nexus3, nginx). Before I reinstalled and upgraded, the containers had no issues communicating with the internet / resolving external DNS. Now the containers will only resolve DNS / communicate to the Internet if I run the container -u root (as root user). The other related related symptom is that /etc/resolv.conf can only be read when you enter the containers as -u root - otherwise regardless of file permissions / ownership the container says file not readable. I tried explicitly setting --dns on container startup, changing between host and bridge network and other tricks, but only running as -u root would cause Internet connectivity / DNS to start working - and this is consistent across varied containers (a base Centos container, Nexus, …).
I am running Docker 20.10.17-ce on SLES 12 SP 5 using devicemapper with a mapped file (that I upsized using dd). This basic configuration has worked for years through multiple updates / rebuilds of docker home, and still works on other hosts.
Here is my Docker info below:
Server Version: 20.10.17-ce
Storage Driver: devicemapper
Pool Name: docker-0:46-885781-pool
Pool Blocksize: 65.54kB
Base Device Size: 21.47GB
Backing Filesystem: xfs
Udev Sync Supported: true
Data file: /dev/loop0
Metadata file: /dev/loop1
Data loop file: /opt/itds/cicd/docker/devicemapper/devicemapper/data
Metadata loop file: /opt/itds/cicd/docker/devicemapper/devicemapper/metadata
Data Space Used: 25.22GB
Data Space Total: 187.9GB
Data Space Available: 162.7GB
Metadata Space Used: 51.68MB
Metadata Space Total: 2.147GB
Metadata Space Available: 2.096GB
Thin Pool Minimum Free Space: 18.79GB
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
Library Version: 1.03.01 (2021-05-07)
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 1
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: io.containerd.runc.v2 io.containerd.runtime.v1.linux oci runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 31aa4358a36870b21a992d3ad2bef29e1d693bec
runc version: v1.1.4-0-ga916309fff0f
init version:
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.12.14-122.113-default
Operating System: SUSE Linux Enterprise Server 12 SP5
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.49GiB
Docker Root Dir: /opt/itds/cicd/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false