diff --git a/docker-compose/lofar-device-base/Dockerfile b/docker-compose/lofar-device-base/Dockerfile
index 98ec3363dbb9ab26d4f10c4ece335cd55e10ac11..faa0f761a8ec60932292d2196fe5ae67471f5b75 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 44605c52c7eed433cf89d0fab66d51946ce305cd..dfba35a67ca1578918a6a5bb42e78aa9a656b967 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