Interview Prep/Docker/Networking and Compose

Outbound HTTPS from containers works only through a corporate proxy.

IntermediateScenarioNetworking and Compose
Answer

Situation read → Build and runtime need proxy settings; daemon pulls need them separately.

What I'd do →

  1. Client side: ~/.docker/config.json "proxies": {"default": {"httpProxy": "...", "noProxy": "..."}} injects env vars into containers and builds.
  2. Daemon pulls: systemd drop-in Environment="HTTPS_PROXY=..." for docker.service.
  3. Install the corporate CA into base images.

Why → The daemon, build containers and runtime containers are three separate places.

Interview tip → Do not bake proxy settings into images.

All Docker questions Roadmap: Docker & containers

More on Networking and Compose