Skip to content

Commit 636cff2

Browse files
authored
Merge pull request #32100 from stormqueen1990/arm64
feat: arm64-compatible Dockerfile for local development
2 parents bf89f9c + 7a8d695 commit 636cff2

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

Dockerfile

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,42 @@
44
# change is that the Hugo version is now an overridable argument rather than a fixed
55
# environment variable.
66

7-
FROM golang:1.15-alpine
7+
FROM golang:1.16-alpine
88

99
LABEL maintainer="Luc Perkins <[email protected]>"
1010

1111
RUN apk add --no-cache \
1212
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 \
1330
git \
1431
openssh-client \
1532
rsync \
16-
build-base \
17-
libc6-compat \
1833
npm && \
1934
npm install -D autoprefixer postcss-cli
2035

21-
ARG HUGO_VERSION
22-
2336
RUN mkdir -p /usr/local/src && \
2437
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 && \
2738
addgroup -Sg 1000 hugo && \
2839
adduser -Sg hugo -u 1000 -h /src hugo
2940

41+
COPY --from=0 /go/bin/hugo /usr/local/bin/hugo
42+
3043
WORKDIR /src
3144

3245
USER hugo:hugo

0 commit comments

Comments
 (0)