Unable to find image 'hello-world:latest' locally Docker - docker

This is the first time I am trying to set up docker (version 17.09.0-ce). I have followed the all instructions from official site and this run ok on my machine (Windows 10 x64). When I type docker --version on console returns Docker version 17.09.0-ce, build afdb6d4. But i am trying execute docker run -t hello-world and this is the answer:
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
my internet is from proxy, but I make a VPN and everything work perfectly except docker, I even install python packages using pip. what could be wrong?

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)

This should resolve the issues for most.
For windows behind a proxy, you can do the followings to resolve this issue
go to your proxy setting under resources and enter your proxy credentials
username:password#yourdomain:port.
Important make sure to account for special character Unicode conversion
for example, if you have # in your password then you replace it with: %23
you can covert special characters via site.

I resolve this modifing daemon.json and put my proxy there. In case of Windows on Docker Desktop, go to Resources, Proxies:

For users in China, I recommand this answer.
You need to add a valid address to pull the image "hello-world".

Related

install elastic search in docker

I used these two commands in cmd:
docker pull elasticsearch
show error:
Using default tag: latest
Error response from daemon: manifest for elasticsearch:latest not found: manifest unknown: manifest unknown
and this command with several different versions:
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.9.0
show error:
Error response from daemon: Get https://docker.elastic.co/v2/elasticsearch/elasticsearch/manifests/7.9.0: Get https://docker-auth.elastic.co/auth?scope=repository%3Aelasticsearch%2Felasticsearch%3Apull&service=token-service: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
how to resolve this problem?
please guide me.
latest version of elastic search does not work out of the box
https://github.com/elastic/elasticsearch-docker/issues/215
so, use specific version to install
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.11.1
Looking at your error message, while pulling the docker image, it seems that your network is blocking you to access the public docker repo to fetch the image.
request canceled while waiting for connection (Client.Timeout
exceeded while awaiting headers)
By any chance are you behind a VPN or firewall or having some restricition on public network/docker registry access?
docker run elasticsearch:{version} -d
use version, which you want to install
example -> docker run elasticsearch:8.4.3 -d
can other images be pulled?
Have you made any modifications to the docker default registry like adding new local registries to this file
/etc/containers/registries.conf
https://www.docker.com/blog/how-to-use-your-own-registry/
and also please check with the port rules for port 5000.
check your firewall, might likely be the culprit.
had the same issue running a compose file trying to pull image from image: docker.elastic.co/elasticsearch/elasticsearch:${VERSION} i modified it to image: elasticsearch:${VERSION} and it worked. i.e. removing the docker.elastic.co/elastisearch part of the original url

Docker doesn't connect under proxy

My configuration is: Win 10 Pro; Virtual Box 6.0; in Virtual Box, Linux Mint Cinnamon 19.2; and in Linux I have Docker 19.03.5.
From my home connection all works fine and also Docker; I can, i.e., make a "search" without problems. At my work I have a proxy and proxy is well configured (Internet is available and also the browser works fine); for Docker proxy configuration, I have done exactly what is described in this official page https://docs.docker.com/network/proxy/ but Docker doesn't work. If I try a sudo docker search, I see a message:
Error response from daemon: Get https://index.docker.io/v1/search?q=mysql&n=25: dial tcp 52.6.213.218:443: i/o timeout
How can I fix the problem?
Edit
This is another response, if I try to run something:
user#User-VirtualBox-Mint:/$ sudo docker run hello-world
[sudo] password for user:
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
Solution: the solution is in this forum
https://docs.docker.com/config/daemon/systemd/
I created a new folder /etc/systemd/system/docker.service.d and in this folder I created the file http-proxy.config. In this file I wrote the following line. Reload demon, restart docker and all works fine.
[Service]
Environment="HTTP_PROXY=http://127.0.0.1:my_port/"
Environment="HTTPS_PROXY=http://127.0.0.1:my_port/"

Docker Error when proxy is set : proxyconnect tcp: dial tcp: lookup http: no such host

I am facing one weird issue with docker. We have a corporate proxy and using docker on Windows server 2016.
I am trying to pull docker image from dockerhub.
Started facing this issue recently. It was working fine earlier.
Steps
1) Set HTTP and HTTPS Proxy
2) Executed docker pull hello-world:nanoserver
Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: dial tcp: lookup http: no such host
Any idea whats going wrong here. I have couple of other machines having same setting and works fine.
Update 1: 06/03/2019
I did some trial and error and found that docker version is the culprit here.
I installed docker 17.06.2-ee-17, 17.06.2-ee-16 and tried pulling image. It worked fine.
So now question is what is wrong with latest 3 versions of docker ee for windows. i.e 17.06.2-ee-18,17.06.2-ee-19,17.06.2-ee-20 which is giving me this error.
We had exactly the same issues.
It appears to work in the newer versions when we used the fully qualified version of our proxy server.
i.e. http://proxy-server.my-domain.net:8080 instead of http://proxy-server:8080
Sorry, My answer is for Linux ("Error response from daemon: Get https://registry-1.docker.io/v2/:Proxyconnect tcp: dial tcp:lookup proxy.example.com:no such host")
Firsty check docker version with this command ($docker -v )
Output: Docker version 19.03.10, build 9424aeaee9 (Can be any version)
Check Can you ping to google ($ping google.com )
If it work, dont need to fix the file (/etc/hosts and /etc/resolv.conf)
$sudo snap install docker
Then check PATH environment variable
$echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin ( Output must be like this)
The output doesn't include /snap/bin path. You can define with below command
$export -n PATH=$PATH:/snap/bin
$echo $PATH ( check with this command )
Now login to docker hub
$docker login
When login succeeded,can pull any images from docker hub
$docker pull hello-world

Minikube external registry Failed to pull image redis-ha

Working on getting development environment setup in Minikube and ran across an issue pulling images from the https://quay.io/v2/ registry.
I have ran the command:
eval $(minikube docker-env) .
Which allows me to build my local Dockerfile in Minikube and it does a great job with that and deployments work great with local images.
I then used helm to install
helm install stable/mssql-linux .
Which worked fine and its image points to this microsoft/mssql-server-linux:2017-CU3 HERE
I am also working with redis-ha and installed like so:
helm install stable/redis-ha --set="rbac.create=false"
The rbac.create=false seems to allow it to install in Minikube without causing all sorts of issues. However, despite creating deployments and services...the deployments ultimately fail because it cant pull the image.
I get the following error:
Failed to pull image "quay.io/smile/redis:4.0.8r0": rpc error: code = Unknown desc = Error response from daemon: Get https://quay.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
The deployments point to this registry image: quay.io/smile/redis:4.0.8r0
I have changed my DNS pretty much everywhere I could to point to 8.8.8.8 as it seems like it cant resolve the URL. It could also just be that I need to add the registry someplace? I kind of feel that its registry specific since Minikube docker daemon appears to be able to pull from docker hub but not quay.io.
If I use a terminal that is not running eval $(minikube docker-env) and use the docker daemon on my host computer I can pull the quay.io/smile/redis:4.0.8r0 image just fine...ssh into minikube and try and it cant pull.
Minikube version
minikube version: v0.25.0
Docker for Mac
Version 17.12.0-ce-mac55 (23011)
as it seems like it cant resolve the URL
What lead you to believe that, when the error clearly states that it has a Client.Timeout exceeded while awaiting headers? It resolved the registry to an IP address, and even apparently opened a network connection to what it thinks is the registry's IP and port. But after that, the networking stack in minikube did not, in fact, allow the traffic out. Observe that the error wasn't DNS, and it wasn't connection refused, it was connection timed out. That is almost always a firewall-esque behavior.
That smells very, very much like a corporate HTTP proxy, since your machine can interact with the Internet but minikube cannot.
There are a ton of troubleshooting steps one could go through, however, if you are interested in a very quick win, you can, from your working host computer, run docker save quay.io/smile/redis:4.0.8r0 | ssh-into-minikube "docker load" and treat minikube as if it were airgapped.
I dont know what the underlying reason was...perhaps Minikube just being fragile but ended up:
Removing minikube
rm -rf ~/.minikube
Running start again
minikube start --vm-driver=hyperkit
Reran init helm init
Now everything is pulling as it should....

Unable to pull docker image, getting 'remote error: access denied'

I'm trying to check the installation docker pull hello-world
But getting the following error:
Pulling repository hello-world
Get https://index.docker.io/v1/repositories/library/hello-world/images: remote error: access denied
I have CentOS 6.5
Docker version 1.7.1, build 786b29d/1.7.1
I'm in a corporate network but curl https://index.docker.io/v1/repositories/library/hello-world/images forks fine.
What might be the issue?
Thanks in advance!
I got this error while I was trying to pull mongodb image instead of mongo.
So make sure image name is correct. The very same error message happens on both run and pull commands.
Had the same problem & error on the host working via proxy.
In essence - if you are behind an HTTP proxy server, you will need to add proxy configuration in the Docker systemd service file.
https://docs.docker.com/engine/admin/systemd/
(See at "HTTP proxy" section).
This helped me.
Did you add your user in docker group
https://docs.docker.com/engine/installation/linux/centos/#/create-a-docker-group
Otherwise, you should execute docker command with sudo before
docker pull hello-world

Resources