From 2ff4ca2325666c4a72a51bb326cb0afdf82b32f3 Mon Sep 17 00:00:00 2001 From: Jonas Tobias Hopusch Date: Wed, 5 Jun 2024 18:34:16 +0200 Subject: [PATCH] Simplify Dockerfile --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1b58fcb..ce13856 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,15 +3,19 @@ ARG WEBSITE_ARCHIVE_URL ARG WEBSITE_ARCHIVE_FOLDER ARG WEBSITE_HOST -RUN apk update && apk upgrade && set -eu - -RUN apk add zola --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ && apk add tar gzip curl +RUN apk update +RUN apk upgrade +RUN set -eux +RUN apk add tar gzip curl +RUN apk add zola --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ COPY archive-token.txt /archive-token.txt -RUN curl -X "GET" -H "Authorization: token $(cat /archive-token.txt)" "$WEBSITE_ARCHIVE_URL" 2>/dev/null | gzip --decompress --stdout - | tar xf - ; rm /archive-token.txt +RUN curl -X "GET" -H "Authorization: token $(cat /archive-token.txt)" "$WEBSITE_ARCHIVE_URL" | gzip --decompress --stdout - | tar xf - +RUN rm /archive-token.txt WORKDIR /$WEBSITE_ARCHIVE_FOLDER -RUN zola build ; rm public/404.html +RUN zola build +RUN rm public/404.html RUN wget -O /tmp/Caddyfile "https://git.jotoho.de/jotoho/site-deployer/raw/branch/master/$WEBSITE_HOST/Caddyfile" >/dev/null 2>&1