Merge pull request 'fix: add --network=host to docker and fix build tool fallback order' (#89) from fix/docker-network-host-and-tool-detection into master
ci/woodpecker/push/deploy-almalinux8 Pipeline was successful
ci/woodpecker/push/deploy-almalinux9 Pipeline was successful

Reviewed-on: #89
This commit was merged in pull request #89.
This commit is contained in:
2026-04-25 16:14:57 +10:00
+8 -2
View File
@@ -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)")