I am not able to run docker run hello-world after installing docker on windows server 2016 VM

Expected behavior

docker run hello-world should run properly

Actual behavior

getting below error when i run docker run hello-world

Unable to find image ‘hello-world:latest’ locally
C:\Program Files\Docker\docker.exe: Error response from daemon: Get https ://registry-1.docker.io/v2/: http: error connecting to proxy http ://username:password@proxy:port/: dial tcp: lookup tcp/port: getaddrinfow: The specified class was not found.
See ‘C:\Program Files\Docker\docker.exe run --help’.

Information

installed docker on windows server 2016 using below command

  1. Installation

Install-Module -Name DockerMsftProvider -Force
Install-Package -Name docker -ProviderName DockerMsftProvider -Force
Restart-Computer -Force

then updated to version 17.05.0-ce because of connectivity issue

PS C:\Users\Administrator> docker version
Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.7.5
Git commit: 89658be
Built: Fri May 5 15:36:11 2017
OS/Arch: windows/amd64

Server:
Version: 17.05.0-ce
API version: 1.29 (minimum version 1.24)
Go version: go1.7.5
Git commit: 89658be
Built: Fri May 5 15:36:11 2017
OS/Arch: windows/amd64
Experimental: false

PS C:\Users\Administrator> docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 17.05.0-ce
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: l2bridge l2tunnel nat null overlay transparent
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 1
Total Memory: 8GiB
Name: METRO2K16-03
ID: Z6NS:QNQD:MRBU:PCNX:7LWW:PONF:JM4H:PK37:NHB3:BUGG:ARPQ:M6I7
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): false
Http Proxy: http://username:password@proxy:port/
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

Seem like i cant connect to docker hub from my windows server 2016 VM with docker installed.
what need to be done to get it working?

1 Like

Hi, thanks for posting.

Does your network require you to go through a proxy before connecting to the internet?

yes… proxy was the culprit. set HTTP_PROXY, HTTPS_PROXY & NO_PROXY in environment variables and all good now :slight_smile:

I’m glad to hear it! Please let us know if you run into any more problems.

Thanks!
Jason

@rizwanparkar

If you remove the Docker you installed and install it with the Edge version here https://store.docker.com/editions/community/docker-ce-desktop-windows. You should be able to run Linux Container on Windows Server 2016.

When you run docker version, you should get linux/amd64 for Server, OS/Arch:

Server:
OS/Arch: linux/amd64

excuse me, how to configure that

Goto Docker Setting --> Proxies --> Click on manual proxy configuration
and apply it …
You will got results of hello-world image

I did this with my windows 10 and I can’t pull or log in and I have Error response from daemon: Get https://registry-1.docker.io/v2/: Method Not Allowed

How to correct that ?

hi how to fix proxy, I am new in Docker.

thanks

Hiii
I have the same issue but i changed my proxy settings but it is not working.

PS C:\Windows\system32> docker run hello-world
Unable to find image ‘hello-world:latest’ locally
C:\Program Files\Docker\Docker\resources\bin\docker.exe: Error response from daemon: Get https://registry-1.docker.io/v2
/: proxyconnect tcp: dial tcp: lookup HTTPS_PROXY on 192.168.65.1:53: no such host.
See ‘C:\Program Files\Docker\Docker\resources\bin\docker.exe run --help’.

please help me that out !!!.

you can still run your docker image inside the desired container manually.
just run your Docker Desktop and from there search the image you need to run, assign port and container and click run.
I did work for me, although I still cannot run my image using command line from VS Code.