Search code examples
dockerhttp-proxy

Set http_proxy for Docker parent image build


I'm running Docker on a machine that relies on an internal proxy for all internet access.

I'd like to base my image on pointslope/datomic-pro-starter:0.9.5130 which uses this Dockerfile.

It uses curl during ONBUILD. How do I set http_proxy at that level? I tried ENV and ARG but I don't think that's meant for parent images.


Solution

  • I don't think Docker can support this currently.

    The Dockerfile is plain text, I will recommend to re-write the Dockerfile from beginning, which you can insert proxy servers on the top.