Skip to content

Commit 68f90ad

Browse files
script/cpatch.py: run container build with host networking
Applies host networking to building the image. This is handy when using custom networking hacks that redirect repos, etc. Signed-off-by: John Mulligan <[email protected]>
1 parent ed48018 commit 68f90ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/script/cpatch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,10 @@ def build(self):
467467
def _container_build(self):
468468
log.info("Building container image")
469469
cmd = [self._ctx.engine, "build", "--tag", self._ctx.target, "."]
470+
cmd.append('--net=host')
470471
if self._ctx.root_build:
471472
cmd.insert(0, "sudo")
473+
log.debug("Container build command: %r", cmd)
472474
_run(cmd, cwd=self._workdir).check_returncode()
473475

474476
def _build_tar(

0 commit comments

Comments
 (0)