DEV Community

Discussion on: "Behind the Corporate Proxy"

Collapse
juppwerner profile image
Jo Werner • Edited on

Hello Shriharsrsh,

Thanks for this great article. I am also struggeling with HTTP proxies at many places :-(

At the section "Setting proxy while building an image", where you write:

docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy ...

...I noticed that my uppercase variable names from the WINDOWS environment keep uppercase in the MINGW docker shell. So I need to write the values in uppercase, too:

docker build --build-arg http_proxy=$HTTP_PROXY --build-arg https_proxy=$HTTP_PROXY ...

Or:

  • Edit the .bashrc
  • Add some lines to get the lower case variables copied:
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTPS_PROXY
export no_proxy=$NO_PROXY

Then, running:

docker build --build-arg http_proxy --build-arg https_proxy ...

is sufficient.

Regards
Joachim