`docker pull` fails behind the corporate proxy with `dial tcp: lookup registry-1.docker.io: i/o timeout`, although `curl` works in your shell.
IntermediateTroubleshootingCloud networking: VPC, firewalls, NAT, VPN and proxies
Answer
Likely causes → The Docker daemon is a systemd service; it doesn't inherit your shell's HTTPS_PROXY. It tries to go direct, and direct DNS/egress is blocked.
Diagnose →
systemctl show docker --property=Environment
docker info | grep -i proxy
Fix →
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo tee /etc/systemd/system/docker.service.d/http-proxy.conf <<'CONF'
[Service]
Environment="HTTP_PROXY=http://proxy.corp:3128"
Environment="HTTPS_PROXY=http://proxy.corp:3128"
Environment="NO_PROXY=localhost,127.0.0.1,.corp,registry.internal"
CONF
sudo systemctl daemon-reload && sudo systemctl restart docker
Containers need their own proxy settings at build/run time (~/.docker/config.json proxies block).
Prevent → Configure daemon proxy and a pull-through registry mirror in the base image so builds don't depend on the corporate proxy.
More on Cloud networking: VPC, firewalls, NAT, VPN and proxies
An EC2 instance in a private subnet hangs on `apt-get update` at `Connecting to archive.ubuntu.com`.BeginnerA new EC2 instance in a "public" subnet can't be reached over SSH from the internet; the SG allows port 22 from your IP.BeginnerThe SG allows inbound 443 and the app works from inside the VPC, but internet clients time out. The subnet NACL allows inbound 443.IntermediateA VPC peering connection is `Active`, but instances in the two VPCs can't ping each other.BeginnerALB targets are `unhealthy` with reason `Target.Timeout`, and VPC Flow Logs show `REJECT` from the ALB's IPs to the instances.BeginnerTwo VPCs are attached to a Transit Gateway, but traffic between them fails.Intermediate