podman wsl communication issue - docker

I am switching from docker to podman currently. Usually that works just fine. However on one of my many company laptops I ran into the following error:
PS C:\WINDOWS\system32> podman pull quay.io/podman/hello
Trying to pull quay.io/podman/hello:latest...
Error: initializing source docker://quay.io/podman/hello:latest: pinging container registry quay.io: Get "https://quay.io/v2/": dial tcp 54.163.152.191:443: i/o timeout
The above error I also get with other container registries. I tried:
Tried:
podman machine set --rootful
removing hyper-v and wsl
changing resolv.conf and adding nameserver
(tried also 8.8.8.8)
looked into symantec endpoint protection logs
(connection is not blocked)
switched between wsl 1 and 2
also tried some stuff from this thread (cf. No internet connection on WSL Ubuntu (Windows Subsystem for Linux))
I also do not get any internet inside e.g. an Ubuntu WSL VM. In Powershell running e.g. curl google.com works just fine
For completeness sake with the third option changes I get:
podman pull quay.io/podman/hello
Trying to pull quay.io/podman/hello:latest...
Error: initializing source docker://quay.io/podman/hello:latest: pinging container registry quay.io: Get "https://quay.io/v2/": dial tcp: lookup quay.io: Temporary failure in name resolution
Update:
I reinstalled Docker and get a similar issue
docker container run hello-world
Unable to find image 'hello-world:latest' locally
docker: initializing source docker://hello-world:latest: pinging container registry registry-1.docker.io: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io: Temporary failure in name resolution.
See 'docker run --help'.

Related

Unable to pull any image from Docker public repository

I am unable to pull any image from the Docker public repository.
Until yesterday, everything was OK.
Nothing had changed in my network configuration.
No VPN, no proxy, working at home - connection at 540 Mbps according to fast.com.
I am using docker engine on Ubuntu 22.04 running inside WSL
Host Operating System:
Windows 11 Professionnal - Version 22H2 - Build 22621.819
$ docker -v
Docker version 20.10.19, build d85ef84
I have tried:
changed the default DNS to dns_google (8.8.8.8)
restarted the docker demon
restarted WSL
restarted the computer
connected to the internet on another network (4G)
flushed the DNS info locally (ipconfig /flushdns on Windows CMD)
searched for any reports of unavailability, change of rules on docker official site.
I was expecting the image to be downloaded to my local computer to be used by docker,
but I got this:
$ 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 <my_ip>:53: read udp <my_ip>:42896-><my_ip>:53: read: connection refused

How to change DNS with Docker Toolbox for Windows 10 Home version

I have an issue with Docker Toolbox :
$ docker build -t myproject/myproject-docker .
Sending build context to Docker daemon 371.8MB
Step 1/4 : FROM openjdk:8-jdk-alpine
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.15:37892->10.0.2.3:53: i/o timeout
Someone suggests maybe a solution in this thread : https://stackoverflow.com/a/48776535/5240905
by changing dns address to 8.8.8.8
But in order to do that I need to modify docker settings and I can't figure out where it is...
I have no docker icon in the system tray cause of Docker Toolbox (different from Docker for Windows).
So, does that error come from the dns address which is incorrect, and if it's the case : Where can I change the default profile of Docker to choose 8.8.8.8 as default DNS address ?
Finally, this solution works : https://stackoverflow.com/a/34301566/5240905
You just need to restart the VM.

Docker: can't run hello-world. Windows 10

I'm a newbie in docker. I try to run
$ docker run hello-world
And I got this error:
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy..
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
Also I allowed all points for this app in firewall
screenshot
I ran into that issue while moving from mac to windows. I would recommend to check the following things:
How many network adapters do you have? Check if there are too many and if docker is using the correct one. In case you have too many - delete the one which is not being used
for some people the network protocol IP6 needed to be deactivated to get docker to talk to the internet
check your traffic on the network adapter - in case you are using hyper-v you need to make sure that the network adapter is allowed to use the one which is connected to the internet
I hope this gave you a notch into the right direction.
I resolved this issue on windows 10 by resetting the DNS server to use the Google DNS fixed address: 8.8.8.8 (docker documentation)
After installing the docker for windows, I got the error as below.
PS C:\Users<Username>> docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled (Client.Timeout exceeded while awaiting headers).
So made changes in docker > Settings > Resources > Network > updated docker subnet to
10.0.75.0/24.
It worked like charm after.

How do I pull a local insecure registry image in a rancher service?

I have two VMs (OS ubuntu desktop), one is rancher server (192.168.72.128) and other machine has docker registry (192.168.72.139) using portus.
The configurations are all correct, I add a registry into the rancher with proper credentials.
Name Hostname
mydocker-registry 192.168.72.139:5000
From the rancher server, I can do a docker login to the docker registry, and I can do a docker pull 192.168.72.139:5000/myimage successfully.
However when I try to add the service image through the rancher UI it shows this error:
Error (Image [mydocker-registry/myimage:latest] failed to pull:
Error: image mydocker-registry/myimage not found)
But I can see the image using portus UI at : http://192.168.72.139:3000/. Does any one have a clue as to why this maybe happening ??
Edit: 5/7/2016 (5.12 pm) : If I try to use the registry's proper hostname address in the rancher UI (rather than registry name) when starting a service, I get the following errors. I am not sure as to how to use this then ?
Error (500 Server Error: Internal Server Error ("unable to ping
registry endpoint https://192.168.72.139:5000/v0/ v2 ping attempt
failed with error: Get https://192.168.72.139:5000/v2/: tls: oversized
record received with length 20527 v1 ping attempt failed with error:
Get https://192.168.72.139:5000/v1/_ping: tls: oversized record
received with length 20527"))
Did you try it without the SSL by adding the insecure option to the docker daemon clients???
First you need to stop the docker service and then execute
sudo docker -d --insecure-registry 192.168.72.139:5000
or add the flag "--insecure-registry 192.168.72.139:5000" to the docker daemon service so when you start the docker service the flag is active.
You can check if the flag is active by looking the ps
ps -aux | grep docker

boot2docker on windows - Unable to pull images

I am trying to explore dockers. I have got boot2docker installed on my windows machine. My machine is behind corporate firewall.
When I execute the simple command like the one below, I get the error that prevents images being pulled. Any help here ?
Even when I changes the dns nameserver ( in /etc/resolv.conf) to 8.8.8.8 , I have the same issue.
I looked at other issues posted on same subject . Did not get any help .
Please help
Error
docker#boot2docker:~$ docker run -it --rm tomcat:8.0 Unable to find
image 'tomcat:8.0' locally
Pulling repository tomcat
Get link: dial tcp: loo
kup index.docker.io on 10.0.2.3:53: read udp 10.0.2.3:53: i/o timeout
When your host is on the VPN, your boot2docker-vm VM may not have access to the internet at all; in particular if your connection is bridged. You can try NAT.
https://github.com/boot2docker/boot2docker/issues/628

Resources