Docker: Error while executing 'docker run hello-world' command - windows

I have installed docker toolbox for Windows 7 64 bit system. I am getting following error while executing 'docker run hello-world' command .
Please guide me to resolve this.
Thanks in advance!
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
78445dd45222: Pulling fs layer
C:\Program Files\Docker Toolbox\docker.exe: error pulling image configuration: G
et https://dseasb33srnrn.cloudfront.net/registry-v2/docker/registry/v2/blobs/sha
256/48/48b5124b2768d2b917edcb640435044a97967015485e812545546cbed5cf0233/data?Exp
ires=1484910885&Signature=DsT7p2RzmUsymlHz2qG51UJspf9ZvTvHF2pjxJPEi1~c9SomNSk2dv
Sqn1UEpsuse3iVmkq37HKT7cEvRaPsu5vB1RlHBgUg6FJB0DGukLBIq1t2hddVPvlI4Q7lm5B5j3NzRI
vj-hYXrAYDxKAM3TX6LsIdrSrmTHlyIZJ4~1A_&Key-Pair-Id=APKAJECH5M7VWIS5YZ6Q: read tc
p 10.0.2.15:40664->52.222.190.31:443: read: connection reset by peer.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.

Thats a connection issue. Try using a different internet connection or using a vpn or an http proxy.
Whitelisting DockerHub's IPs:
Docker Hub doesn't have static IP that can be whitelist. Docker Hub is based on Amazon ELB, so they can change any time.
You can do the following and add a subset of ips, May work for you for a short period of time.
dig +noall +answer index.docker.io
;; ANSWER SECTION:
index.docker.io. 174 IN CNAME elb-io.us-east-1.aws.dckr.io.
elb-io.us-east-1.aws.dckr.io. 465 IN CNAME us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com.
us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com. 174 IN A 52.200.132.201
us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com. 174 IN A 52.45.107.172
us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com. 174 IN A 52.22.146.88
On windows, try nslookup.

Related

Unable to pull images no such host on Windows

I tried to build a docker file on Windows OS. But i got this instead.
muhammad.iqbal#IQBAL MINGW64 /d/DockerTest
$ docker build .
Sending build context to Docker daemon 73.36 MB
Step 1/3 : FROM php:7.1.27-apache
Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.65.1:53: no such host
I have tried to restart and relaunch docker application but nothings change.
i have read this and this. but it's on LInux OS, but how to do it on Windows OS.
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.65.1:53: no such host
lookup registry-1.docker.io: no such host
Okay so just like Pierre B. comment, at the time of that issue, i was using my office's VPN. So it's pretty simple, just turn of the VPN and tried to pull it again.
But i don't know what's the reason unable to pull any images when i am using the office's VPN.

how to make kubernetes to run in docker for desktop in windows

looks like this
using windows version 10,
docker for windows(docker verion) : 18.09.2
how to resolve this issue ?
Kubernetes should be running.
But check your cluster-info:
> kubectl cluster-info
Kubernetes master is running at http://localhost:8080
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
That is reported both in docker/machine and docker/for-win or kubernetes/minikube.
While the issue is pending, and if no firewall/proxy is involved, I have seen the error caused because the port is already taken.
See also this article:
Issue
The reason you are getting the error message is that Kuberentes is not looking into the correct configuration folder because the configuration path is not configured on the Windows 10 machine.
Solution
To fix the problem, I will run the command below that will tell Kubernetes where to find the configuration file on the machine.
Powershell
[Environment]::SetEnvironmentVariable("KUBECONFIG", $HOME + "\.kube\config", [EnvironmentVariableTarget]::Machine)

Cannot forward ports when running Linux container on Windows10 as a host

I'm new using Docker. I have been trying to deploy a Linux container (with Windows as a host) with a Google Cloud image inside using Docker. I'm able to do everything well, at the end the server is running perfectly, but when I want to check the server, using the localhost in the browser, I got a blank page with:
Blank page
This is the Dockerfile:
FROM google/cloud-sdk
ENV PATH /usr/lib/google-cloud-sdk/bin:$PATH
WORKDIR docker_folder
COPY local_folder/ .
RUN pwd
EXPOSE 8080
CMD ["java_dev_appserver.sh", "."]
This is the command I'm using to build my image (in the CMD):
docker build --tag serverdeploy .
This is the command I'm using to run my container
docker run -p 8080:8080 serverdeploy
This is the stack trace that I got when I run the server
where I know that I running the server
I did some research and looks like Docker had a problem with the ports when you use a Linux container in Windows (Not sure if it's already solved or not). I've already tried all the possible solutions that I found out there (even trying to replace 'localhost' by all the ip's that I get when I run ipconfig on the cmd) but I still get the same error.
And, as last hope, I need your help to understand what I'm doing wrong, or if I missing something
You are running your service bind to localhost - that means no remote connections are accepted (as well as binding to 127.0.0.1. And for your container the host is a remote connection.
Change binding to 0.0.0.0 (which I guess is default) and enjoy.
Btw sharing your java_dev_appserver.sh would be helpful for answering the question.

authenticationrequired error when trying to pull docker images with Docker CLI

I'm trying to pull a simple hello-world image from docker hub using :
docker run hello-world
But I'm getting this error on Windows 7 :
Unable to find image 'hello-world:latest' locally
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: Get https://registry-1.docker.io/v2/: authenticationrequired.
I've tried so many different things but none seem to work :
1 - I tried logging in, but I'm getting the same error :
docker login
Tried my username, my email ... Same error :
Error response from daemon: Get https://registry-1.docker.io/v2/: authenticationrequired
2 - Restarted docker machine, same error.
3 - Reinstalling Docker and Oracle VirtualBox multiple times
4 - Done all the steps here : https://github.com/docker/kitematic/wiki/Common-Proxy-Issues-&-Fixes
I really don't know how to fix this anymore.
I had this problem when I tried to login to the docker behind a corporate proxy. Are you in a similar situation? If so, see if you add "https://registry-1.docker.io/v2/" to the exemption list for proxy's HTTPS analysis.
If you are not behind a proxy, check to see if you have any software that do a HTTPS analysis. Sometimes software like Fiddler or Antivirus does that. If you found anything like that see if you can whitelist the url
Hope it helps. I had a hard time figuring this out for my issue

docker proxy pull windows 10

After install docker v1.12.0-rc2 on windows 10 pro machine, set the http and https variables, i get the following 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: Error while pulling image: Get https://index.docker.io/v1/repos
itories/library/hello-world/images: x509: certificate is valid for FG200B3911602237, not index.docker.io.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
world image is images for Linux container, you can't use it on windows container.
At the moment, there're only about 9 or 10 images for windows containers, you can use it follow this article https://msdn.microsoft.com/en-us/virtualization/windowscontainers/deployment/deployment.
After install v1.12.0-rc3-beta18 build 5226 pull container works behind a proxy. tks #huy-tran

Resources