start.simoncor.net/Dockerfile.linux.amd64
Simon Cornet f75b06a1f7
All checks were successful
Build and Publish / Build (push) Successful in 39s
Build and Publish / Deployment (push) Successful in 6s
[hugo] feat: use copy instead of git clone where possible
2024-10-14 11:08:23 +02:00

31 lines
592 B
Docker

FROM cr.simoncor.net/siempie/hugo-sws:latest
# build cache date argument trick
ARG GITEA_SHA=some_sha
RUN echo $GITEA_SHA
# copy site
COPY . /src
# clone template
RUN set -e \
&& git clone https://github.com/gesquive/slate /src/themes/slate
# generate site
RUN set -e \
&& /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/"]