From 2d66b0ac62f8a93193d60ef98c2d58bc17c96ffb Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Sat, 17 Sep 2022 05:32:17 +0000
Subject: [PATCH] L2SS-951: Sudo set debconf

---
 docker-compose/lofar-device-base/Dockerfile | 2 +-
 sbin/tag_and_push_docker_image.sh           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docker-compose/lofar-device-base/Dockerfile b/docker-compose/lofar-device-base/Dockerfile
index 98ec3363d..faa0f761a 100644
--- a/docker-compose/lofar-device-base/Dockerfile
+++ b/docker-compose/lofar-device-base/Dockerfile
@@ -4,7 +4,7 @@ FROM ${SOURCE_IMAGE}
 # What how tango ignores all of this anyway...
 ARG DEBIAN_FRONTEND=noninteractive
 ARG DEBCONF_NONINTERACTIVE_SEEN=true
-RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
+RUN echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
 
 RUN sudo apt-get update && sudo apt-get install -y git g++ gcc shellcheck graphviz python3-dev libboost-python-dev libtango-dev pkg-config && sudo apt-get clean
 
diff --git a/sbin/tag_and_push_docker_image.sh b/sbin/tag_and_push_docker_image.sh
index 44605c52c..dfba35a67 100755
--- a/sbin/tag_and_push_docker_image.sh
+++ b/sbin/tag_and_push_docker_image.sh
@@ -166,7 +166,7 @@ if [ ! -z "${1+x}" ] && [ "${1}" != "pull" ]; then
         docker pull "${local_url}:latest" || true
       fi
 
-      make build "${1}"
+      make build "${1}" || exit 1
       docker tag "${2}" "${local_url}:${tag}" || docker tag "${2/_/-}" "${local_url}:${tag}"
       docker push "${local_url}:${tag}"
     fi
-- 
GitLab