Problem
The Docker build process fails intermittently when downloading packages during apt-get install, specifically when installing Chrome dependencies in the AMD64 stage. The error occurs when the network connection drops during package downloads:
Impact
- Builds fail randomly, requiring manual retries
- CI/CD pipelines become unreliable
- Developer experience is degraded due to inconsistent builds
Expected Behavior
Docker builds should handle transient network failures gracefully and retry failed package downloads automatically.
Environment
- Base Image:
node:18.19.0-bullseye
- Architecture: AMD64 and ARM64
- Affected Files:
Dockerfile.dev, Dockerfile
Proposed Solution
Add retry logic with --fix-missing flag to apt-get install commands to handle transient network failures.
