简体   繁体   中英

Boot2docker proxy on Windows

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

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 

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.

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:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM