4

I have installed boot2docker on Windows. I've tried to configure the proxy with the help of https://github.com/boot2docker/boot2docker-cli/issues/230, but it didn't work.

When I execute boot2docker download, I get the following error:

boot2docker download
Latest release for github.com/boot2docker/boot2docker is v1.6.0
Downloading boot2docker ISO image...
error in run: Failed to download ISO image: Get https://s3.amazonaws.com/github-cloud/releases/14930729/0573f322-e442-11e4-8500-b1bbe904b032.iso?response-content-disposition=attachment%3B%20filename%3Dboot2docker.iso&response-content-type=application/octet-stream&AWSAccessKeyId=AKIAISTNZFOVBIJMK3TQ&Expires=1430303112&Signature=oTercMri%2FkqD9cbA315JhNHzehk%3D:
Proxy Authentication Required
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mansuro
  • 4,558
  • 4
  • 36
  • 76

3 Answers3

7

See "How do I get Docker to run on a Windows system behind a corporate firewall?".

You need to set up:

  • set HTTP_PROXY, HTTPS_PROXY and NO_PROXY in your cmd session, in order for boot2docker download to work.

  • (export) http_proxy, http_proxy and no_proxy in the /var/lib/boot2docker/profile in order for a docker search (for example) to work.

    export http_proxy=http://<user>:<pwd>@proxy.company:80
    export https_proxy=http://<user>:<pwd>@proxy.company:80
    export no_proxy=.company,.sock,localhost,127.0.0.1,::1,192.168.59.103
    
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • The directory structure `/var/lib/boot2docker` doesn't exist, should I create it? – Mansuro Apr 29 '15 at 10:40
  • 1
    It will exist in the boot2docker vm: read the link I mention: everything is detailed there. And the GitHub project b2d implements that. – VonC Apr 29 '15 at 12:25
  • I setup HTTP_PROXY and HTTPS_PROXY as env variables for my user that worked too. – SidJ May 30 '17 at 01:46
  • You can set the proxy and the password in the Docker settings dialog via the Windows system tray. http://user:pw@proxy:1234 – Adam Nov 29 '17 at 10:39
  • @Adam True. That didn't exist in April 2015 ;) – VonC Nov 29 '17 at 11:59
1

VonC's solution worked for me. Other guides suggested using:

--engine-env HTTP_PROXY=...etc

In the docker-machine.exe, create a section of start.sh, but that didn't work for me. Adding the export HTTP_PROXY lines before the create line did the trick.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
obrienk
  • 481
  • 5
  • 10
1

Try to use Docker create in a CMD windows like this (I'm using CNTLM, but it is the same idea):

docker-machine create -d virtualbox 
  -engine-env HTTP_PROXY=[IP]:3128 
  -engine-env HTTPS_PROXY=[IP]:3128 
default

Some references that helped me a lot:

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Akostha
  • 679
  • 7
  • 8