From 3ec20522c16fdf9d6d2f5ec76b3aaae78ed12358 Mon Sep 17 00:00:00 2001 From: Markus Baertschi Date: Fri, 17 Jan 2025 21:52:25 +0100 Subject: [PATCH] Optionally add --network to docker build --- compile-with-docker.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compile-with-docker.sh b/compile-with-docker.sh index eaa6061..69ec1b2 100755 --- a/compile-with-docker.sh +++ b/compile-with-docker.sh @@ -1,8 +1,14 @@ #!/bin/sh #export DOCKER_DEFAULT_PLATFORM=linux/amd64 +#export DOCKER_NETWORK="--network=host" IMAGE_NAME="uvk5" rm "${PWD}/compiled-firmware/*" -docker build -t $IMAGE_NAME . +echo "Building docker image $IMAGE_NAME" +if ! docker build -t $DOCKER_NETWORK $IMAGE_NAME . +then + echo "Failed to build docker image" + exit 1 +fi custom() { echo "Custom compilation..."