fix: Add --network=host to single-arch Docker builds
Fixes network isolation issue in Docker builds where containers couldn't reach external networks (PyPI, apt repos, etc). **Problem:** - Multi-arch buildx builds use: --driver-opt network=host ✅ - Single-arch builds were missing: --network=host ❌ - Result: Docker build containers had [Errno 101] Network unreachable **Root Cause:** When docker build runs without --network=host, build containers are isolated from the host network and can't reach external services. **Solution:** Add --network=host flag to single-arch docker build command on line 131. **Testing:** This matches the configuration used successfully in multi-arch builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2f63e3fb34
commit
c40fb2111d
@ -128,7 +128,7 @@ class ImageBuilder {
|
||||
architectures.each { architecture ->
|
||||
def archTag = architecture.split("/")[1]
|
||||
steps.log.info("ImageBuilder", "Building image ${registry}/${repository}/${name} with architectures: ${architectures}, tag sets to ${version}")
|
||||
steps.sh "docker build -t ${registry}/${repository}/${name}:${version} --platform ${architecture} -f ${dockerfile} ${contextRoot}"
|
||||
steps.sh "docker build --network=host -t ${registry}/${repository}/${name}:${version} --platform ${architecture} -f ${dockerfile} ${contextRoot}"
|
||||
steps.sh "docker push ${registry}/${repository}/${name}:${version}"
|
||||
}
|
||||
steps.env.BUILD_IMAGE_REGISTRY = "${registry}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user