docker / desktop-linux

Bug reports for Docker Desktop for Linux
https://docs.docker.com/desktop/linux/
73 stars 5 forks source link

socks5 proxy not working #60

Open videni opened 1 year ago

videni commented 1 year ago

My case is very similar to this [Use socks5 proxy from host for docker build]. How can I make the run wget -c abc.com/t.exe command to use proxy ?

First try

# step 1:  add environment
# /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTPS_PROXY=socks5://127.0.0.1:1089"
Environment="HTTP_PROXY=socks5://127.0.0.1:1089"

# step 2: restart service

sudo systemctl daemon-reload
sudo systemctl restart docker

# step 3: check

sudo systemctl show --property=Environment docker

Then run

docker info // I can see the http and https proxy turned into socks5://127.0.0.1:1089
docker build --network=host   .   // but run this command, I didn't see any traffic through  socks5://127.0.0.1:1089

Second try

~/.docker/config.json

{
 "proxies":
 {
   "default":
   {
     "httpProxy": socks5://127.0.0.1:1089",
     "httpsProxy": "socks5://127.0.0.1:1089"
   }
 }
}

Then run

docker build --network=host   .   //  got unsupported proxy configured: socks5://127.0.0.1:1089.
aiordache commented 1 year ago

@thaJeztah should we move this to moby/moby?

docker-robott commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robot[bot] commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale