I want to ssh to a server and run a docker command in it. I can run docker command locally on my pc but when I connect to the server it shows this error:
Unable to find image 'hello-world:latest' locally docker: Error response from daemon: error parsing HTTP 408 response body: invalid character '<' looking for beginning of value: "<html><body><h1>408 Request Time-out</h1>\nYour browser didn't send a complete request in time.\n</body></html>\n". See 'docker run --help'.
What should I do?
Thank you in advance.
I thought maybe it is a proxy issue but I disabled them all and got the error again.
Related
I’m receiving an unexpected EOF (I think) when I try to get to the Docker registry during a docker pull. I am trying to pull the mongo image, but I get the same message for any docker image. Here is the message from Power Shell.
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: EOF.
I found this post from earlier this year, but as far as I can tell, I don’t have docker-cli installed in wsl:
wsl --list --verbose
NAME STATE VERSION
Debian running 2
docker-desktop running 2
docker-desktop-data running 2
I have uninstalled and reinstalled both docker and wsl twice. Same result every time. It’s not a proxy/firewall issue. curl https://registry-1.docker.io returns a 200. curl https://registry-1.docker.io/v2/ returns a 403, which seems normal to me since I’m not specifying any kind of file or page.
Any help is appreciated.
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/"
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
I am newbie into docker did the following:
couldn't install docker engine on my windows 7, but instead:
installed docker tool-box (engine should be already included)
the terminal from the docker tool-box shows me the sign of the docker and everything should be good but i face problem with the following:
cant run the simple image "hello-world"
docker run hello-world
The Error Message:
Unable to find image 'hello-world:latest' locally
after login with username and password it appears error (i think it is connected with the same error)
docker login
The Error Message:
Error response from daemon: Get https://registry-1.docker.io/v2/:
dial tcp: look up registry-1.docker.io on 10.0.2.3:53: no such host
any idea on how to track the reason of such error messages and find away to resolve and solve such issues?
i am new to docker ,installed docker for windows 10 : version 18.06.0-ce, build 0ffa825
i tried to execute the first docker pull command but it doesn't succeed , i am beside a corporate proxy and the connection to docker server is working fine .
here is what i got :
PS C:\WINDOWS\system32> docker pull microsoft/nanoserver
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: Forbidden.
when i call the link https://registry-1.docker.io/v2/ on the browser i get:
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}
edit :
after changing the proxy address i had :
Error response from daemon: Get https://registry-1.docker.io/v2/: Proxy Authentication Required
i have followed the same as windows docker behind a corporate proxy: ,but still i facing the same issue.
The normal solution to this is just docker logout, that's solved it every time anybody I know has it it. Somehow docker gets its credentials out of order or something.
After a lot of search i solved the issue by following this step ,
it may work or not depending on you corporate proxy.
find bellow the steps i followed :
install the cntlm from : cntlm.sourceforge.net
connect to your corporate web proxy using this command :
cntlm -H -u username -d domainname .
username :your domain/proxy account name
domainname: the actual domain name
finally you can execute : docker pull