I use port-forwarding like this:
ssh -vND 1080 user@server_ip
Question:
How can I pull docker images with socks5?
pulling docker images with the
docker pullcommand already has an answer here. But I want to usedocker-composefor pulling images
You can set the proxy config in the services systemd config (/etc/systemd/system/docker.service.d/http-proxy.conf):
[Service]
Environment="HTTP_PROXY=socks5://127.0.0.1:1080"

The service config works for docker-compose pull as well:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With