Facing ISsue while pulling images in Docker - docker

I was trying to create Image via DockerFile.
While pulling image I am facing below error
Pulling repository docker.io/library/ubuntu
Error while pulling image: Get https://index.docker.io/v1/repositories/library/ubuntu/images: dial tcp 52.45.107.172:443: getsockopt: network is unreachable
Could anyone help me out ,were exactly the issue.Its proxy issue, however I set the proxy Still its not working

Related

podman wsl communication issue

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'.

Docker context defined with https resulting an error reaching out to port 80

I have setup a docker registry using docker-compose, largely following the recipe published by Docker here: https://docs.docker.com/registry/recipes/nginx/
Nginx and my registry start, and I am able to issue docker login from a different machine:
docker login https://myhost.mydomain.net
Once logged in I can push and pull images as expected.
Now I need a way to manage content in the remote registry. To that end, I defined a context:
docker context create myregistry-prod --docker "host=https://myhost.mydomain.net"
The command results in this message, which appears to arise during basic authentication:
error during connect: Post "http://myhost.mydomain.net/v1.24/auth": dial tcp 192.168.176.71:80: connectex: No connection could be made because the target machine actively refused it.
I assumed that a context using https would operate inside a TLS connection, so I'm surprised to see the client attempting to open port 80. By design, I have no program listening on port 80, hence the connection is refused.
Note that I am able to fetch the catalog using this URL in a browser, https://myhost.mydomain.net/v2/_catalog . The browser prompts for basic credentials, I supply them and get back the expected result. It appears that the Docker API working as expected passing through the Nginx container and being serviced by the registry container.
So, the question is, how do I go about diagnosing the issue? Did I make an error defining the context?
I'm quite sure I have a misunderstanding. This is my first attempt at docker compose and my first attempt at using nginx in front of Docker Registry. I will redact and post nginx.conf and docker-compose.yml if you need them but I am guessing it's a client-side problem. Any help you might offer will be greatly appreciated.

Docker: vethXXXXXXX: Failed to get link config: No such device

My docker container fails to communicate with the outside world no matter ports are open and network is properly set. I get ping, container is started without issues, but does not communicate over tcp. I get the error
systemd-udevd[11922]: veth09e2558: Failed to get link config: No such device
Any idea how to solve this?

Docker: No connection could be made because the target machine actively refused it

ErrorDisplayedHere
I tried many ways like reinstalling Docker, changing DNS server,restarting windows, but nothing worked out.
Unable to find image 'hello-world:latest' locally docker: Error
response from daemon: Get https://registry-1.docker.io/v2/: dial tcp
100.24.246.89:443: connectex: No connection could be made because the target machine actively refused it.
Open Docker Settings and select "Expose daemon on tcp://localhost:2375 without TLS" (on the General tab), then apply & restart Docker. Do note the warning about the vulnerability that this option exposes.

Use Docker Compose offline by using local images and not pulling images

I want to issue the docker-compose command to bring up all the dependent service containers that I have previously pulled down while inside the company network. I am outside the company network so when I try to start my environment the first thing it does is try to call out to the company network and then fails with:
ERROR: Error while pulling image: Get http://myartifactory.service.dev:5000/v1/repositories/my_service/images: dial tcp 127.0.53.53:5000: getsockopt: connection refused
How can I force docker-compose to use the local images and not try to pull down the latest?
You can force docker-compose to use local images by first running:
docker-compose pull --ignore-pull-failures

Resources