From 825e872a8d3bb96c37cc9c581fc71c2289458f2f Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sat, 17 Sep 2022 14:38:26 +0200 Subject: [PATCH] fix(Dockerfile): fail build when apt-get fails --- Dockerfile | 10 +++++----- build.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e71c83f..849da5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,16 @@ FROM debian:bookworm-slim -RUN set -eux; \ - apt-get update; \ - DEBIAN_FRONTEND=noninteractive apt-get upgrade -y; \ +RUN set -eux && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ openssh-server \ curl \ telnet \ net-tools \ screen \ - ; \ - rm -rf /var/lib/apt/lists/*; \ + && \ + rm -rf /var/lib/apt/lists/* && \ rm /etc/ssh/ssh_host_*key* ADD start.sh / diff --git a/build.sh b/build.sh index 0997456..4821dfa 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #!/bin/sh -set -x +set -ex IMAGE=pommib/jumpbox:latest docker pull $IMAGE