File tree Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change 4
4
# change is that the Hugo version is now an overridable argument rather than a fixed
5
5
# environment variable.
6
6
7
- FROM golang:1.15 -alpine
7
+ FROM golang:1.16 -alpine
8
8
9
9
LABEL maintainer=
"Luc Perkins <[email protected] >"
10
10
11
11
RUN apk add --no-cache \
12
12
curl \
13
+ gcc \
14
+ g++ \
15
+ musl-dev \
16
+ build-base \
17
+ libc6-compat
18
+
19
+ ARG HUGO_VERSION
20
+
21
+ RUN mkdir $HOME/src && \
22
+ cd $HOME/src && \
23
+ curl -L https://github.com/gohugoio/hugo/archive/refs/tags/v${HUGO_VERSION}.tar.gz | tar -xz && \
24
+ cd "hugo-${HUGO_VERSION}" && \
25
+ go install --tags extended
26
+
27
+ FROM golang:1.16-alpine
28
+
29
+ RUN apk add --no-cache \
13
30
git \
14
31
openssh-client \
15
32
rsync \
16
- build-base \
17
- libc6-compat \
18
33
npm && \
19
34
npm install -D autoprefixer postcss-cli
20
35
21
- ARG HUGO_VERSION
22
-
23
36
RUN mkdir -p /usr/local/src && \
24
37
cd /usr/local/src && \
25
- curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | tar -xz && \
26
- mv hugo /usr/local/bin/hugo && \
27
38
addgroup -Sg 1000 hugo && \
28
39
adduser -Sg hugo -u 1000 -h /src hugo
29
40
41
+ COPY --from=0 /go/bin/hugo /usr/local/bin/hugo
42
+
30
43
WORKDIR /src
31
44
32
45
USER hugo:hugo
You can’t perform that action at this time.
0 commit comments