@@ -284,11 +284,15 @@ def should_skip(image, cached):
284284 # Note:
285285 # - The pull secret is necessary in some builds for pulling embedded
286286 # container images referenced in release-info RPMs
287+ # - The host network usage is required to access the RPM repository
288+ # proxy server using the localhost URL to make generated builds
289+ # reusable from cache on other hosts.
287290 # - The explicit push-to-mirror sets the 'latest' tag as all the build
288291 # layers are in the mirror due to 'cache-to' option
289292 build_args = [
290293 "sudo" , "podman" , "build" ,
291294 "--authfile" , PULL_SECRET ,
295+ "--network" , "host" ,
292296 "--secret" , f"id=pullsecret,src={ PULL_SECRET } " ,
293297 "--cache-to" , f"{ MIRROR_REGISTRY } /{ cf_outname } " ,
294298 "--cache-from" , f"{ MIRROR_REGISTRY } /{ cf_outname } " ,
@@ -373,7 +377,8 @@ def should_skip(file):
373377 # cached but not fetched from the mirror registry.
374378 pull_args = [
375379 "sudo" , "podman" , "pull" ,
376- "--authfile" , PULL_SECRET , bf_imgref
380+ "--authfile" , PULL_SECRET ,
381+ bf_imgref
377382 ]
378383 start = time .time ()
379384 common .retry_on_exception (3 , common .run_command_in_shell , pull_args , dry_run , logfile , logfile )
@@ -384,6 +389,7 @@ def should_skip(file):
384389 build_args = [
385390 "sudo" , "podman" , "run" ,
386391 "--rm" , "-i" , "--privileged" ,
392+ "--network" , "host" ,
387393 "--pull=newer" ,
388394 "--security-opt" , "label=type:unconfined_t" ,
389395 "-v" , f"{ bf_outdir } :/output" ,
0 commit comments