1.I have installed docker desktop in mac and configured the web proxy, I have logged in to docker shell and running application , application connecting to proxy and working fine
2. I have installed docker.io(apt install docker.io) in linux and configured proxy
CMD:
docker run -it --rm -e http_proxy=http://:8080 -e https_proxy=http://:8080 sh
i have tried all below possibilities
added proxy details:
/etc/docker/daemon.json
{
“proxies”: {
“http-proxy”: “http://:8080”,
“https-proxy”: “http://:8080”
}
}
/etc/systemd/system/docker.service.d/http-proxy.conf OR override.conf
~/.docker/config.json
“proxies”: {
“default”: {
“httpProxy”: “http://:8080”,
“httpsProxy”: “http://:8080”
}
}, ISSUE::
In container application is running, all web request should go through the web proxy, but in my case not going through the proxy, i have verified packet and verified in proxy logs also
In docker container i’m running curl command “curl -v ”, this traffic going through the proxy, but application traffic not going through proxy,
Please, format your post according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.
Example code block:
```
echo "I am a code."
echo "An athletic one, and I wanna run."
```
After fixing your post, please send a new comment so people are notified about the fixed content.
I have installed docker desktop in mac and configured the web proxy, I have logged in to docker shell and running application , application connecting to proxy and working fine
I have installed docker engine in linux and configured proxy container level and docker level
ISSUE::
If i run the application it will send the https request to get the info, in linux container not using the web proxy
I have captured the packets and verified the proxy logs, not finding the any request from linux host
If run curl or wget request receiving in proxy but application requests not receiving
example:: curl -v
CMD docker run -it --rm -e http_proxy=http://:8080 -e https_proxy=http://:8080 sh
I have tried all below possibilities still my application not running with proxy
If the problem is in the container, try runnint the env command in the container and make sure you have HTTP_PROXY, http_proxy, HTTPS_PROXY and https_proxy set.
env | grep -i proxy
In you docker command you have only the lowercase versions. Some programs support only the lowercse or upparcase. This is why Docker sets both when you configure it in the json, but if anything goes wrong and the variables are not all set, the some app may fail to use the proxy. If all variables exist, then the app itself could be the one that does not support those variables.
And what is the application? I really don’t see other reason than the application does not use these variables. What kind of application is it? Python, Java, anything else?