diff options
author | crupest <crupest@outlook.com> | 2022-12-02 14:51:43 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-12-02 14:51:43 +0800 |
commit | 5e3789139746430df5a58ca14daa6745de7a1f76 (patch) | |
tree | fbf18364296957bd1e512dd55115604abca59dd0 | |
parent | 73d3799c6dc71cc42977640b67ebabac703f60bd (diff) | |
download | crupest-5e3789139746430df5a58ca14daa6745de7a1f76.tar.gz crupest-5e3789139746430df5a58ca14daa6745de7a1f76.tar.bz2 crupest-5e3789139746430df5a58ca14daa6745de7a1f76.zip |
Hugo.
-rw-r--r-- | docker/crupest-blog/Dockerfile | 11 |
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" ] |