From 95f448c51164bef07a1743c8cbd5a1ff65d0fe92 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 28 Sep 2026 09:46:41 +0200 Subject: [PATCH] utils/docker-run: add NO_NETWORK variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is sometimes useful to be able to do an offline build, to make sure the build works properly without network access, so this commit adds a NO_NETWORK environment variable to our docker-run script, which for example allows to do: $ ./utils/docker-run make source $ NO_NETWORK=1 ./utils/docker-run make Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain (cherry picked from commit d6f816facc4371a0bc4ae351e90584e585258864) Signed-off-by: Raphaël Mélotte --- utils/docker-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/docker-run b/utils/docker-run index 27c169db72..8cb15c9c48 100755 --- a/utils/docker-run +++ b/utils/docker-run @@ -21,7 +21,7 @@ declare -a docker_opts=( --user "$(id -u):$(id -g)" --workdir "$(pwd)" --security-opt label=disable - --network host + --network "$([ "${NO_NETWORK:-0}" -eq 1 ] && echo none || echo host)" ) declare -a mountpoints=(