Configure Docker Toolbox Behind NTLM Proxy

It started when i was trying docker toolbox, and i couldn’t build my source into docker image. It said network is unreachable.

If your company behind MS Proxy Server that using the proprietary NTLM protocol and then get frustated when try to configure your docker machine, i will give hint to solve this.



Make sure you already installed the CNTLM. After CNTLM had been installed, generate the hash for your password:

cd C:\Program Files (x86)\Cntlm

then run

cntlm -H

after that copy and paste that result into cntlm.ini, this is sample of configuration of mine:

Username    putu_p
Domain		  mitrais
Workstation mtpc4xx
Listen		  3128
NoProxy		  localhost,, 127.0.0.*, 10.*, 192.168.*
PassLM      A5D1254C3A188EF0197EEB862F9AXXXX
PassNT      8CDF8943D83AF8103B7C6849146BXXXX
PassNTLMv2  AF53BD9898560A113E82FCA0C8DFXXXX    # Only for user 'putu_p', domain 'mitrais'

next one is you can restart CNTLM Authentication Proxy Service


Setup cntlm is done! let’s move out to proxy configuration on docker machine.

Setup Proxy on Docker Machine

Open the docker quickstart terminal. Then go into inside docker machine with

$ docker-machine ssh default

then edit the boot2docker profile to append the proxy configuration

docker@default:~$ sudo vi /var/lib/boot2docker/profile 

Add the proxy like this:

export http_proxy=
export https_proxy=
export no_proxy=localhost,,10.0.2.*

Now restart and try search image from docker hub

docker@default:~$ sudo /etc/init.d/docker restart
docker@default:~$ exit
$ docker search ubuntu

If you success, then welcome abroad capt! If not just put your comment below.


Kembali ke Beranda