Rootless Docker - attempting 'hello-world', "lookup no such host"

After upgrading from Ubuntu 20.04 to 22.04, docker rootless can no longer connect to the internet and fails the basic ‘hello-world’ setup test. Initialized with ‘’. However, using the regular daemon, ‘dockerd’, works fine with no issues. The error returned when attempting ‘docker run hello-world’:

docker: Error response from daemon: Get “”: dial tcp: lookup no such host.

I setup another distro of 20.04 but that didn’t seem to work either. Not quite sure what has happened. I did notice all my images had ‘disappeared’, as they were under vfs storage and now docker has switched to overlay2. These were located in .local/share/docker, which is the rootless folder, so it definitely was working before!

I’ve reinstalled docker and rootless docker completely, set the variables in .bashrc, set the iptables to legacy for both v4 & v6, tried adding dns numbers to daemon.json, etc. I’m a linux novice, and I’m all out of ideas at this point! Hopefully one of you can shine some light on the problem :slight_smile:

Errors during initialization:

[2023-05-31T18:56:47.981398110+01:00] failed to initialize a tracing processor “otlp” error=“no OpenTelemetry endpoint: skip plugin”

[2023-05-31T18:56:47.979877010+01:00] cleanup working directory in namespace error=“open /home/dev1/.local/share/docker/containerd/daemon/io.containerd.runtime.v2.task/moby: no such file or directory” namespace=moby


WSL version:
Ubuntu 22.04.2 LTS

Just figured out the solution, thanks to these instructions: Rootless `docker` install failed: `ip_tables` not found in module dir · Issue #7466 · microsoft/WSL · GitHub

Not sure why this works to be honest. The resolv.conf file, created by WSL2, worked fine when using rootful docker. Hey-ho.

Important take aways: Setting ‘systemd’ on boot in wsl.conf, and disabling resolv.conf from being created too - and creating the file manually with nameserver