buildroot: unshare the network

Run the container in a new network namespace, to isolate the host's
network from that of the container. Stages, assemblers and the tools
they execute are not supposed to assume network access is available
and this isolation will make sure of that.
This commit is contained in:
Christian Kellner 2020-07-28 13:00:45 +02:00 committed by Tom Gundersen
parent 785f843901
commit c5925fd185

View file

@ -188,6 +188,7 @@ class BuildRoot(contextlib.AbstractContextManager):
"--setenv", "PYTHONPATH", "/run/osbuild/lib",
"--unshare-ipc",
"--unshare-pid",
"--unshare-net"
]
cmd += mounts