@ TMzethar
Maybe you (and all others from TM) have overseen in my initial post in this thread i made already a complete analyis of this problem.
You can take ANY Image to see this problem. If you running this image as root, its working fine, if you have to use another user, its in stuck
sample. This affects ANY Container with the working User not running as root (as it is recommanded for security reasons)
Code: Select all
docker run --rm -it ubuntu
root@7ae02c35fcbe:/# getent hosts www.google.de
2a00:1450:400c:c07::5e www.google.de
We are root, it works
Now create a "normal user", switch to this user and try again
Code: Select all
root@7ae02c35fcbe:/# useradd -m test
root@7ae02c35fcbe:/# su - test
$ id
uid=1000(test) gid=1000(test) groups=1000(test)
$ getent hosts www.google.de
No answer means not found. The reason is (as already explained), the resolv.conf and maybe more files in /Volume1/DockerData are not readable within the container for others
Code: Select all
root@7ae02c35fcbe:/# ls -l /etc/resolv.conf
-rw-r-----+ 1 root root 469 Aug 23 18:46 /etc/resolv.conf
with docker inspect <container> |grep Path you can find the real location of these system mountet files
Code: Select all
"ResolvConfPath": "/Volume1/DockerData/containers/2c8461f8bcc17da9b0cd15fa3b6f9bd7278d35a4e0805a61c397f8b805bc2d61/resolv.conf",
"HostnamePath": "/Volume1/DockerData/containers/2c8461f8bcc17da9b0cd15fa3b6f9bd7278d35a4e0805a61c397f8b805bc2d61/hostname",
"HostsPath": "/Volume1/DockerData/containers/2c8461f8bcc17da9b0cd15fa3b6f9bd7278d35a4e0805a61c397f8b805bc2d61/hosts",
"LogPath": "/Volume1/DockerData/containers/2c8461f8bcc17da9b0cd15fa3b6f9bd7278d35a4e0805a61c397f8b805bc2d61/2c8461f8bcc17da9b0cd15fa3b6f9bd7278d35a4e0805a61c397f8b805bc2d61-json.log",
> ls -laZ /Volume1/DockerData/containers/2c8461f8bcc17da9b0cd15fa3b6f9bd7278d35a4e0805a61c397f8b805bc2d61/resolv.conf
-rwxrwx---+ 1 diskmaster diskmaster ? 86 Aug 23 21:01 /Volume1/DockerData/containers/2c8461f8bcc17da9b0cd15fa3b6f9bd7278d35a4e0805a61c397f8b805bc2d61/resolv.conf
You can compare the needed file system permission with other docker implementations. Here is a sample from a ubuntu vm, these files should be readable for "others"
Code: Select all
sudo ls -laZ /docker_sys/var/containers/07c3215f6b7fe4ed02b7644dab5ca10e6ced6dfd490f86508e9a30a39e1bf3ef/resolv.conf
-rw-r--r-- 1 root root ? 81 Aug 20 09:16 /docker_sys/var/containers/07c3215f6b7fe4ed02b7644dab5ca10e6ced6dfd490f86508e9a30a39e1bf3ef/resolv.conf
Pls fix the the permission settings and this problem will be solved