]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
script/cpatch.py: run container build with host networking
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 27 Mar 2024 18:32:10 +0000 (14:32 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 27 Mar 2024 18:32:10 +0000 (14:32 -0400)
Applies host networking to building the image. This is handy when using
custom networking hacks that redirect repos, etc.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/script/cpatch.py

index 1dfb51347951781c8b8924209c909b50b6a90d87..fa1cecc5943b008da2d99044e5b7a11364d948b3 100755 (executable)
@@ -467,8 +467,10 @@ class Builder:
     def _container_build(self):
         log.info("Building container image")
         cmd = [self._ctx.engine, "build", "--tag", self._ctx.target, "."]
+        cmd.append('--net=host')
         if self._ctx.root_build:
             cmd.insert(0, "sudo")
+        log.debug("Container build command: %r", cmd)
         _run(cmd, cwd=self._workdir).check_returncode()
 
     def _build_tar(