From ce0be5fefcbdb17ab93c4b5bdfddca34c9bd020c Mon Sep 17 00:00:00 2001 From: Dirk Date: Mon, 9 Dec 2019 10:26:39 +0100 Subject: [PATCH] Handle problem when pulling fails ... when e.g. sitting in a German train with bad internet connection --- utils/docker-debian10.tls13only.start.sh | 2 ++ utils/docker-nginx.tls13-earlydata.start.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/utils/docker-debian10.tls13only.start.sh b/utils/docker-debian10.tls13only.start.sh index 037e945..7fceebb 100644 --- a/utils/docker-debian10.tls13only.start.sh +++ b/utils/docker-debian10.tls13only.start.sh @@ -5,6 +5,8 @@ image=${1:-"debian:buster"} docker pull "$image" ID=$(docker run -d -ti $image) +[[ "$ID" ]] && echo "container couldn't be retrieved" >&2 && exit 1 + docker exec -ti $ID apt-get update docker exec -ti $ID apt-get install -y ssl-cert dialog docker exec -ti $ID apt-get install -y nginx-common nginx-light diff --git a/utils/docker-nginx.tls13-earlydata.start.sh b/utils/docker-nginx.tls13-earlydata.start.sh index 53b030a..3fd8f47 100644 --- a/utils/docker-nginx.tls13-earlydata.start.sh +++ b/utils/docker-nginx.tls13-earlydata.start.sh @@ -6,6 +6,8 @@ ID=$(docker run -d -ti $image) echo $ID +[[ "$ID" ]] && echo "container couldn't be retrieved" >&2 && exit 1 + docker exec -ti $ID nginx -V docker exec -ti $ID mkdir /etc/nginx/ssl HN=$(docker exec -ti $ID hostname| tr -d '\n' | tr -d '\r')