How to set proxy in docker toolbox?
I encountered the same problem. Here is my solution.
Env:
Win7, Docker Toolbox 17.03, cmder terminal, behind enterprise proxy setting.
Solution:
in C:\Program Files\Docker Toolbox, find start.sh file. add following two proxy settings:
export http_proxy="http://hostname:port/"export https_proxy="http://hostname:port/"
At least, it works for me.
I have a similar problem for Windows 7 but it was resolved by these steps :
Step 1. Create a batch script C:\Program Files\Docker Toolbox\kitematic_proxy.cmd with below configuration
set proxy=YOUR_PROXYSET HTTP_PROXY=%proxy%SET HTTPS_PROXY=%proxy% for /f %%i in ('docker-machine.exe ip default') do set DOCKER_HOST=%%iSET NO_PROXY=%DOCKER_HOST%set DOCKER_HOST=tcp://%DOCKER_HOST%:2376cd KitematicKitematic.exe
Step 2. Open Oracle Virtual machine from the start menu , go to command prompt by clicking Show (Make sure your Oracle Vm is up and running)
enter sudo vi /var/lib/boot2docker/profile
add this lines
export HTTP_PROXY=http://your.proxy.name:8080export HTTPS_PROXY=http://your.proxy.name:8080
use your proxy address & port
this link help me a lothttps://github.com/docker/kitematic/wiki/Common-Proxy-Issues-&-Fixes
Note:
- Don't forget to add 192.168.99.100 ip to your proxy setting's exception list (use inetcpl.cpl )
- Don't forget to add HTTP_PROXY and HTTPS_PROXY to your user variable (Advance settings->Environment variables)
- Don't forget to restart your pc
Installing docker on windows 7 (docker 18.09.0) behind an enterprise proxy was quite complicated for me. Here are the steps I followed:
- set HTTP_PROXY variable in your windows environment (HTTP_PROXY=http://your_proxy:port)
- install docker toolbox with installer or run in powershell as admin:
choco install docker-toolbox
(Warning! Don't use Docker for windows, as it targets Windows 10) - ensure you don't have any previous VM created by your previous attempts (
docker-machine ls
should be empty. If not run:docker-machine rm default
) - run in powershell as user:
docker-machine --native-ssh create -d virtualbox --engine-env HTTP_PROXY=$HTTP_PROXY --engine-env HTTPS_PROXY=$HTTPS_PROXY default
. - run
C:\Program Files\Docker Toolbox\start.sh
- Now run
docker pull busybox
. This should work.