Docker build fails intermittently due to network errors during apt-get install
- Dominant language
- Python
- Stars
- 2k
- Forks
- 984
- Avg merge
- 2h 54m
- Merged PRs (30d)
- 14
Description
### 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.
Contributor guide
Research direction
Inspect the apt-get install commands in Dockerfile.dev and Dockerfile, focusing on the Chrome dependencies in the AMD64 stage. Reproduce or review the failing Docker build, then verify that transient package-download failures are retried and that both AMD64 and ARM64 builds complete reliably.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100