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.
More on Build failures and cache problems
`failed to solve: process "/bin/sh -c apt-get install -y curl" did not complete successfully: exit code: 100` with `E: Unable to locate package curl`Beginner`E: Failed to fetch http://deb.debian.org/... 404 Not Found` during build of an old image.Intermediate`COPY failed: file not found in build context or excluded by .dockerignore: stat app.jar: file does not exist`Beginner`ERROR: failed to solve: failed to compute cache key: "/requirements.txt" not found: not found`Beginner`failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error on line 12: unknown instruction: RUNN`BeginnerBuild works locally but fails in CI with `exec format error` in a `RUN` step.Intermediate