Score:0

How can I make my docker containers use my proxy?

mc flag

I have two Ubuntu servers.

  • Machine A (Internet is heavily restricted)
  • Machine B

Also I have one Socks5 tunnel on machine A.

My Socks5 proxy command on machine A:

ssh -D 3080 -q -C -N -f root@Machine-B -p 22

I want to redirect all traffic through Socks5 proxy.

How can I make my docker containers use my proxy?

(Docker Containers) <-> [ Socks5 Proxy on Machine A ] <-> [ Machine B ] <-> (Internet)
ru flag
You have to set inside each docker container the relevant http_proxy and https_proxy environment variables on the shell to configure proxies there. some applications don't observe that either so you'd have to do some chaos to make it officially work in those applications' configurations
HiStack avatar
mc flag
How to force all traffic go through ssh tunnel ?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.