start.simoncor.net/Dockerfile.linux.amd64

31 lines
592 B
Docker
Raw Permalink Normal View History

2023-05-24 18:08:19 +02:00
FROM cr.simoncor.net/siempie/hugo-sws:latest
2024-09-09 12:58:01 +02:00
# build cache date argument trick
ARG GITEA_SHA=some_sha
RUN echo $GITEA_SHA
# copy site
COPY . /src
# clone template
2022-11-01 13:03:03 +01:00
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
2022-11-01 14:44:43 +01:00
EXPOSE 80
# start static-web-server
ENTRYPOINT ["/usr/local/bin/sws", "--host=0.0.0.0", "--log-level=info", "--port=80", "--root=/site/"]