Docker Community Forums

Share and learn in the Docker community.

Docker/windows/virtualbox/corporate proxy/cannot connect to hub


(Taggess) #1

I am running docker on windows using virtualbox in a corporate machine.
I cannot connect docker hub, not even able to login to hub
tried all the options which are suggested in this forum with no luck.
Need some expert advise please.

$ docker run --env http_proxy=http://proxy.com:8080 hello-world
Unable to find image ‘hello-world:latest’ locally
Pulling repository docker.io/library/hello-world
Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy.

docker@default:~$ docker login
Username: user
Password:
Email: email
Error response from daemon: Server Error: Post https://index.docker.io/v1/users/: dial tcp 54.174.187.194:443: i/o timeout

docker@default:~$ cat /var/lib/boot2docker/profile

EXTRA_ARGS=’
–label provider=virtualbox


CACERT=/var/lib/boot2docker/ca.pem
DOCKER_HOST=’-H tcp://0.0.0.0:2376’
DOCKER_STORAGE=aufs
DOCKER_TLS=auto
SERVERKEY=/var/lib/boot2docker/server-key.pem
SERVERCERT=/var/lib/boot2docker/server.pem
HTTP_PROXY=http://proxy.com:8080/
HTTPS_PROXY=http://proxy.com:8080

here is the details from the server
docker@default:~$ curl -L -k https://index.docker.io/v1/repositories/library/ubuntu/images
curl: (56) Received HTTP code 400 from proxy after CONNECT
docker@default:~$

docker@default:~$ docker version
Client:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:10:10 UTC 2015
OS/Arch: linux/amd64

Server:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:10:10 UTC 2015
OS/Arch: linux/amd64
docker@default:~$ docker info
Containers: 11
Images: 3
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 25
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.0.9-boot2docker
Operating System: Boot2Docker 1.8.2 (TCL 6.4); master : aba6192 - Thu Sep 10 20:58:17 UTC 2015
CPUs: 1
Total Memory: 1.956 GiB
Name: default
ID: UAJS:2YZW:Z2VW:232X:UEPS:YBAS:SEBU:4KY5:R4YH:7R5J:FM5B:EVAJ
Debug mode (server): true
File Descriptors: 12
Goroutines: 17
System Time: 2015-09-19T17:53:41.193980115Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox
docker@default:~$ uname -a
Linux default 4.0.9-boot2docker #1 SMP Thu Sep 10 20:39:20 UTC 2015 x86_64 GNU/Linux
docker@default:~$


(Mrcoder) #2

You will need to configure the docker service. Put the following lines in /etc/systemd/system/docker.service.d/docker.conf

HTTP_PROXY=http://proxy.com:8080
NO_PROXY=localhost,127.0.0.1,.your-company.com,.f8,.local
http_proxy=http://25.188.8.48:13128
no_proxy=localhost,127.0.0.1,.your-company.com,.f8,.local    

And restart docker service:

$ systemctl restart docker

(Donraikes) #3

I am having the same kind of problem.
docker version 1.111.1 host os windows 7 64-bit
when I ssh into the default VMware vm, there is no /etc/system directory.
Itt doesn’t look like this version of the boot2docker vm uses system for controlling services.
There is a /etc/init.d/docker script but that doesn’t look like there is a way to specify the HTTP_PROXY or HTTPS_PROXY.

When I run the docker quickstart terminal from my windows desktop, I can’t run any docker commands because I assume that docker cannot connect to the outside netwrork.

For example:
$ docker images
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/images/json: open //./pipe/docker_engine: The system cannot find the file specified.

Any help would be appreciated.