How can I make docker-compose pull images using a socks5 proxy?
Method 1
Error:
then setting HTTP_PROXY
and HTTPS_PROXY
this way:
result:
A shot of before HTTP_PROXY
and after setting them up:
Method 2
If method 1 did not work (simple one) you can go with this one:
first
Find systemd location for configuration:
which here for my on Debian 9 is /lib/systemd/system/docker.service
and its directory is /lib/systemd/system/
So cd
into /lib/systemd/system/
.
second
mkdir
for docker.service.d
or:
third
In docker.service.d
directory create a .conf
file like: http-proxy.conf
forth
Add these in http-proxy.conf file:
NOTE that localhost:9040
is mine, update it if you have a different IP or PORT
sixth
Because we update the configuration run:
and then restart docker service
Now it is up and running:
Last updated
Was this helpful?