Merge pull request #32100 from stormqueen1990/arm64

feat: arm64-compatible Dockerfile for local development
This commit is contained in:
Kubernetes Prow Robot
2022-03-15 10:08:10 -07:00
committed by GitHub
+22 -9
View File
@@ -4,29 +4,42 @@
# change is that the Hugo version is now an overridable argument rather than a fixed
# environment variable.
FROM golang:1.15-alpine
FROM golang:1.16-alpine
LABEL maintainer="Luc Perkins <lperkins@linuxfoundation.org>"
RUN apk add --no-cache \
curl \
git \
openssh-client \
rsync \
gcc \
g++ \
musl-dev \
build-base \
libc6-compat \
npm && \
npm install -D autoprefixer postcss-cli
libc6-compat
ARG HUGO_VERSION
RUN mkdir $HOME/src && \
cd $HOME/src && \
curl -L https://github.com/gohugoio/hugo/archive/refs/tags/v${HUGO_VERSION}.tar.gz | tar -xz && \
cd "hugo-${HUGO_VERSION}" && \
go install --tags extended
FROM golang:1.16-alpine
RUN apk add --no-cache \
git \
openssh-client \
rsync \
npm && \
npm install -D autoprefixer postcss-cli
RUN mkdir -p /usr/local/src && \
cd /usr/local/src && \
curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | tar -xz && \
mv hugo /usr/local/bin/hugo && \
addgroup -Sg 1000 hugo && \
adduser -Sg hugo -u 1000 -h /src hugo
COPY --from=0 /go/bin/hugo /usr/local/bin/hugo
WORKDIR /src
USER hugo:hugo