I'm trying to pull images through a socks5 proxy. I've started the socks5 proxy on port 8888
like this:
ssh -NC -D 8888 parham@***.***.**
However, when I run docker-compose
like this, it is evident that it's not using the environment variable:
$ ALL_PROXY=socks5://127.0.0.1:8888 docker-compose up
How can I make Docker pull images through this proxy?
Best Answer
Looks like this feature has been recently added to
docker
, particularly in version1.11.0
. Though there isn't enough documentation about its usage, setting theALL_PROXY
environment variable should work, according to this comment.I'm not sure about
docker-compose
at the moment. If your primary aim is to speed up the download process using socks5, you might be able to achieve the purpose by manually pulling images usingdocker pull
before finally runningdocker-compose up
.