Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot pull images with rootless docker on openSUSE Tumbleweed #329

Closed
tilfischer opened this issue Oct 1, 2023 · 2 comments
Closed

Cannot pull images with rootless docker on openSUSE Tumbleweed #329

tilfischer opened this issue Oct 1, 2023 · 2 comments

Comments

@tilfischer
Copy link

tilfischer commented Oct 1, 2023

Dear all,

recently, I faced a strange issue with rootless docker on openSUSE Tumbleweed, which prevented any pulling of images. Basically, no traffic seems to be leaving the rootlesskit's namespace. Pulling an docker images always gives an i/o timeout:

someuser@somehost:~> docker pull hello-world
Using default tag: latest
Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.100:48971->10.0.2.3:53: i/o timeout

After quiet some digging and and with the help of two users at the docker forum and openSUSE forum, the issue seems to be connected to slirp4netns:

Following the slirp4netns documentation:

Requires /etc/resolv.conf not to be a symlink to a file outside /etc and /run.

However, in openSUSE the resolve.conf is generated in /var/run/netconfig/ from what is given in /etc/sysconfig/network/config and the first is symlinked to /etc/resolve.conf. Removing the simlinked /etc/resolve.conf solved the issue, but should not survive any restart of the sever:

someuser@somehost:~> docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
719385e32844: Pull complete 
Digest: sha256:4f53e2564790c8e7856ec08e384732aa38dc43c52f02952483e3f003afbf23db
Status: Downloaded newer image for hello-world:latest
docker.io/library/hello-world:latest

Best

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Oct 2, 2023

Thanks for reporting.
Was it working before?
Was something changed on tumbleweed recently?

Adding some path (/var/run ?) to --copy-up helps?
https://github.com/moby/moby/blob/591c98cdbee73d36fe27abdb4456f8d70b8e549d/contrib/dockerd-rootless.sh#L107

You may need DOCKERD_ROOTLESS_ROOTLESSKIT_SLIRP4NETNS_SANDBOX=false too
https://github.com/moby/moby/blob/591c98cdbee73d36fe27abdb4456f8d70b8e549d/contrib/dockerd-rootless.sh#L15C2-L15C2

@tilfischer
Copy link
Author

tilfischer commented Oct 2, 2023

Thank for your reply!

I added --copy-up=/var/run to the line mentioned and uninstalled and installed rootless docker. However, this did not help.

What I have found out so far, is that netconfig was changed about a year ago, so that it does now use /run/netconfig instead of /var/run/netconfig.

Copying /var/run/netconfig/resolv.conf (or /run/netconfig/resolv.conf) to /etc or adding a symlink there for /run/netconfig/resolv.conf to /etc/resolv.conf works fine. However, with a symlink to /var/run/netconfig/resol.conf, no traffic can leave the namespace of the rootless docker.

Hence, that seems not be an issue for slirp4netns and I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants