Interview Prep/Docker/Build failures and cache problems

Build hangs at `RUN pip install ...` or `npm install` and eventually times out.

IntermediateTroubleshootingBuild failures and cache problems
Answer

Likely causes → No network from build (proxy, DNS), MTU mismatch on VPN or cloud overlay, or registry outage.

Diagnose →

docker run --rm busybox wget -qO- https://pypi.org/simple/ | head
docker run --rm busybox ping -c1 8.8.8.8
ip link show docker0 | grep mtu

Fix → Set proxies; lower MTU in daemon.json ("mtu": 1400); set DNS servers.

Prevent → Use an internal package mirror.

All Docker questions Roadmap: Docker & containers

More on Build failures and cache problems