I'm trying to run docker-compose
behind a proxy masked by cntlm. In other words, my proxy settings are simply localhost:3128.
1) First of all, I created a new docker-machine
setting the proxy and regenerating the certs:
HOST=10.16.13.232 # IP address of my Mac
PORT=3128 # port cntlm is listening
docker-machine create \
--engine-env HTTP_PROXY=http://$HOST:$PORT \
--engine-env HTTPS_PROXY=http://$HOST:$PORT \
--engine-env NO_PROXY=*.local,169.254/16,localhost,127.0.0.*,10.*,192.168.*,*.example.com \
-d virtualbox \
--virtualbox-memory 2048 \
--virtualbox-disk-size 102400 \
my_new_machine
yes | docker-machine regenerate-certs my_new_machine
2) I set the ENV variables by hitting:
eval $("docker-machine env my_new_machine")
3) And in the current directory I've created my docker-compose.yml
containing:
zookeeper:
image: jplock/zookeeper
container_name: zookeeper
ports:
- "2181:2181"
- "2888:2888"
- "3888:3888"
solr1:
image: makuk66/docker-solr:4.10.4
container_name: solr1
ports:
- "8983:8983"
links:
- "zookeeper:ZK"
command: /opt/solr/bin/solr start -f -c -z zookeeper -a "-Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf -DnumShards=2"
solr2:
image: makuk66/docker-solr:4.10.4
container_name: solr2
ports:
- "8984:8983"
links:
- "zookeeper:ZK"
command: /opt/solr/bin/solr start -f -c -z zookeeper
4) As final step, I proceed to hit docker-compose up
, but I get the following error only if I'm behind my cntlm proxy:
ERROR: SSL error: hostname '192.168.99.100' doesn't match 'localhost'
Instead at home, WITHOUT ANY PROXY, docker-compose
works well.
I tried by looking for any solution outside but I was not able to find/understand such solutions.
Any idea?
Thanks in advance :-)