-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (23 loc) · 1.21 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# SPDX-License-Identifier: Apache-2.0
# set a global Docker argument for the default CLI version
#
# https://github.com/moby/moby/issues/37345
ARG HUGO_VERSION=0.115.4
##########################################################################
## docker build --no-cache --target binary -t vela-hugo:binary . ##
##########################################################################
FROM alpine:3.20.2@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5 as binary
ARG HUGO_VERSION
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz /tmp/hugo.tar.gz
RUN tar -xzf /tmp/hugo.tar.gz -C /bin
RUN chmod 0700 /bin/hugo
########################################################
## docker build --no-cache -t vela-hugo:local . ##
########################################################
FROM alpine:3.20.2@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5
ARG HUGO_VERSION
ENV PLUGIN_HUGO_VERSION=${HUGO_VERSION}
RUN apk add --update --no-cache ca-certificates git libc6-compat libstdc++ nodejs npm
COPY --from=binary /bin/hugo /bin/hugo
COPY release/vela-hugo /bin/vela-hugo
ENTRYPOINT [ "/bin/vela-hugo" ]