From f65eb28575f73752925b217651e20de45df9aaa6 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Mon, 14 Oct 2024 11:03:47 +0200 Subject: [PATCH] [hugo] feat: use copy instead of git clone --- Dockerfile.linux.amd64 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Dockerfile.linux.amd64 b/Dockerfile.linux.amd64 index 28f97ea..50de676 100644 --- a/Dockerfile.linux.amd64 +++ b/Dockerfile.linux.amd64 @@ -5,15 +5,22 @@ ARG GITEA_SHA=some_sha RUN echo $GITEA_SHA # clone site and template -RUN set -e \ - && git clone --recursive https://git.simoncor.net/siempie/simoncor.net.git /site +COPY . /src # generate site RUN set -e \ - && /usr/local/bin/hugo --source=/site/ + && /usr/local/bin/hugo --source=/src/ + +# copy public content +RUN set -e \ + && cp -r /src/public /site/ + +# cleanup +RUN set -e \ + && rm -rf /src # expose 80 EXPOSE 80 # start static-web-server -ENTRYPOINT ["/usr/local/bin/sws", "--host=0.0.0.0", "--log-level=info", "--port=80", "--root=/site/public/"] +ENTRYPOINT ["/usr/local/bin/sws", "--host=0.0.0.0", "--log-level=info", "--port=80", "--root=/site/"]