mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-19 15:22:02 -09:00
utils/docker-run: add NO_NETWORK variable
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 <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit d6f816facc)
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
This commit is contained in:
committed by
Raphaël Mélotte
parent
b7ef4f78cc
commit
95f448c511
@@ -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=(
|
||||
|
||||
Reference in New Issue
Block a user