Topics

Building containers behind a http proxy

David Urbina
 

Hello! I have been trying to build the containers using "make docker" but given the fact that I am in a Intranet behind a proxy it simply fails. The only solution I could find was to modify the Makefile by adding "--build-arg HTTP_PROXY=$(HTTP_PROXY)" to every "docker build". Is there a better way to do this?

Thanks.

Trevor.Conn@...
 

Dell Customer Communication

Have you tried exporting those vars in the terminal session itself and then running “make docker”? That should cause anything in the terminal session that initiates an http connection to use the specified proxy settings and you won’t have to edit the file. That said, if the proxy blocks a website that glide tries to pull a dependency from, you won’t have a way around that without talking to your network admin.

 

Trevor Conn

Senior Principal Software Engineer

Dell Technologies | IoT DellTech

Trevor.Conn@...

Round Rock, TX USA

 

 

From: EdgeX-GoLang@... [mailto:EdgeX-GoLang@...] On Behalf Of edgex@...
Sent: Tuesday, November 27, 2018 4:59 PM
To: EdgeX-GoLang@...
Subject: [Edgex-golang] Building containers behind a http proxy

 

[EXTERNAL EMAIL]

Hello! I have been trying to build the containers using "make docker" but given the fact that I am in a Intranet behind a proxy it simply fails. The only solution I could find was to modify the Makefile by adding "--build-arg HTTP_PROXY=$(HTTP_PROXY)" to every "docker build". Is there a better way to do this?

Thanks.

David Urbina
 

I do have the HTTP_PROXY exported in my terminal session.

Digging a little more on the error, I can see that "docker build" does get the proxy from nthe terminal but it do not pass it to any the internal commands in the Dockerfile.* scripts. For example, "RUN apk" fails because it does not get the proxy.

Docker documentation mentions that the "--build-arg" must be used to pass the proxy to the container been built. But this certainly requires to modify the EdgeX's Makefile.

Is there a better way? or should It open an issue?

Thanks.