From 818a48fa78cd95de09ebf775fd5bb63ecb26051a Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 25 Apr 2026 16:11:40 +1000 Subject: [PATCH] fix: add --network=host to docker and fix build tool fallback order Pass --network=host to docker build and docker create so package builds can reach the network. Reorder auto-detection so Docker is tried before buildah/native, only falling back when the explicit flag is not set. --- tools/build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/build b/tools/build index 31fad44..e6e1f94 100755 --- a/tools/build +++ b/tools/build @@ -769,6 +769,7 @@ def build_package_docker( build_args = [ 'docker', 'build', '--pull', + '--network=host', '-f', str(central_dockerfile), '--build-arg', f'BASE_IMAGE={base_image}', '--build-arg', f'PACKAGE_NAME={package_name}', @@ -801,6 +802,7 @@ def build_package_docker( # Step 2: Create and start container create_args = [ 'docker', 'create', + '--network=host', '--name', container_name, image_name ] @@ -1455,9 +1457,13 @@ class Builder: return True # Check build tool availability (unless dry run) - use_native = native or (not buildah and check_native_build_deps()) - use_buildah = buildah or (not use_native and check_buildah_available()) + use_native = native + use_buildah = buildah use_docker = not use_native and not use_buildah and check_docker_available() + if not use_native and not use_buildah and not use_docker: + use_buildah = check_buildah_available() + if not use_native and not use_buildah and not use_docker: + use_native = check_native_build_deps() if not dry_run and not use_native and not use_buildah and not use_docker: self.logger.error("No build tools available (tried native, Buildah, Docker)")