From 893bd5697488c45809eeebebaff699c7c242c02f Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Tue, 31 Oct 2023 11:22:16 +0100 Subject: [PATCH] utils/docker: use host's network setup Our utils/docker-run wrapper is needed to provide a reproducible build environment: tools, variables, etc... but is not meant for isolation. As such, we do not care which network configuration is used. In some settings (e.g. enterprise networks), it is often the case that a VPN is in use, especially in those wonderful times of widespread remote work. Letting Docker decide on the network setup will most usually lead to it creating a private network that is NATed onto the principal network interface, leading to non-functional network in the container when a VPN is in use. As such, always use the host network configuration, and do not let Docker create a private network for the container. Signed-off-by: Yann E. MORIN Cc: Ricardo Martincoski Signed-off-by: Thomas Petazzoni --- utils/docker-run | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/docker-run b/utils/docker-run index 848e9b3840..464cbf691f 100755 --- a/utils/docker-run +++ b/utils/docker-run @@ -21,6 +21,7 @@ declare -a docker_opts=( --user "$(id -u):$(id -g)" --workdir "$(pwd)" --security-opt label=disable + --network host ) declare -a mountpoints=(