forked from kubernetes/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (26 loc) · 955 Bytes
/
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
# Credit to Julien Guyomard (https://github.com/jguyomard). This Dockerfile
# is essentially based on his Dockerfile at
# https://github.com/jguyomard/docker-hugo/blob/master/Dockerfile. The only significant
# change is that the Hugo version is now an overridable argument rather than a fixed
# environment variable.
FROM golang:1.15-alpine
LABEL maintainer="Luc Perkins <lperkins@linuxfoundation.org>"
RUN apk add --no-cache \
curl \
git \
openssh-client \
rsync \
build-base \
libc6-compat \
npm && \
npm install -D autoprefixer postcss-cli
ARG HUGO_VERSION
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
WORKDIR /src
USER hugo:hugo
EXPOSE 1313