[hugo] feat: use copy instead of git clone where possible
This commit is contained in:
parent
216ebb59ae
commit
f75b06a1f7
@ -4,17 +4,27 @@ FROM cr.simoncor.net/siempie/hugo-sws:latest
|
|||||||
ARG GITEA_SHA=some_sha
|
ARG GITEA_SHA=some_sha
|
||||||
RUN echo $GITEA_SHA
|
RUN echo $GITEA_SHA
|
||||||
|
|
||||||
# clone site and template
|
# copy site
|
||||||
|
COPY . /src
|
||||||
|
|
||||||
|
# clone template
|
||||||
RUN set -e \
|
RUN set -e \
|
||||||
&& git clone https://git.simoncor.net/siempie/start.simoncor.net.git /site \
|
&& git clone https://github.com/gesquive/slate /src/themes/slate
|
||||||
&& git clone https://github.com/gesquive/slate /site/themes/slate
|
|
||||||
|
|
||||||
# generate site
|
# generate site
|
||||||
RUN set -e \
|
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
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# start static-web-server
|
# 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/"]
|
||||||
|
Loading…
Reference in New Issue
Block a user