aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-12-02 14:51:43 +0800
committercrupest <crupest@outlook.com>2022-12-02 14:51:43 +0800
commit360dfab0e291802a1c5a606cab71833db4cbf2ca (patch)
treefbf18364296957bd1e512dd55115604abca59dd0
parent50ea52cd132204770c7ce8e711601216af98f6c9 (diff)
downloadcrupest-360dfab0e291802a1c5a606cab71833db4cbf2ca.tar.gz
crupest-360dfab0e291802a1c5a606cab71833db4cbf2ca.tar.bz2
crupest-360dfab0e291802a1c5a606cab71833db4cbf2ca.zip
Hugo.
-rw-r--r--docker/crupest-blog/Dockerfile11
1 files changed, 10 insertions, 1 deletions
diff --git a/docker/crupest-blog/Dockerfile b/docker/crupest-blog/Dockerfile
index 30c4547..2d8125b 100644
--- a/docker/crupest-blog/Dockerfile
+++ b/docker/crupest-blog/Dockerfile
@@ -1,8 +1,17 @@
+FROM golang:alpine AS build-hugo
+WORKDIR /root
+RUN apk add --no-cache build-base git
+RUN CGO_ENABLED=1 go install --tags extended github.com/gohugoio/hugo@latest
+RUN /root/go/hugo version
+
FROM alpine:latest
+COPY --from=build-hugo /root/go/hugo /usr/bin/
+# check hugo
+RUN hugo version
ARG CRUPEST_BLOG_UPDATE_INTERVAL=1d
ENV CRUPEST_BLOG_UPDATE_INTERVAL=${CRUPEST_BLOG_UPDATE_INTERVAL}
COPY daemon.bash update.bash /scripts/
-RUN apk add --no-cache coreutils tini bash git hugo
+RUN apk add --no-cache coreutils tini bash git
VOLUME [ "/public" ]
ENTRYPOINT ["/sbin/tini", "--"]
CMD [ "/scripts/daemon.bash" ]