2018-06-21 17:13:29 +00:00
|
|
|
# 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 alpine:latest
|
|
|
|
|
2019-12-18 15:03:58 +00:00
|
|
|
LABEL maintainer="Luc Perkins <lperkins@linuxfoundation.org>"
|
2018-06-21 17:13:29 +00:00
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
openssh-client \
|
2018-09-20 11:46:08 +00:00
|
|
|
rsync \
|
|
|
|
build-base \
|
2020-07-01 21:12:21 +00:00
|
|
|
libc6-compat \
|
|
|
|
npm && \
|
|
|
|
npm install -G autoprefixer postcss-cli
|
2018-06-21 17:13:29 +00:00
|
|
|
|
|
|
|
ARG HUGO_VERSION
|
|
|
|
|
|
|
|
RUN mkdir -p /usr/local/src && \
|
|
|
|
cd /usr/local/src && \
|
2019-06-09 13:31:07 +00:00
|
|
|
curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | tar -xz && \
|
2018-06-21 17:13:29 +00:00
|
|
|
mv hugo /usr/local/bin/hugo && \
|
|
|
|
addgroup -Sg 1000 hugo && \
|
|
|
|
adduser -Sg hugo -u 1000 -h /src hugo
|
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
2020-10-03 03:10:33 +00:00
|
|
|
USER hugo:hugo
|
|
|
|
|
2018-06-21 17:13:29 +00:00
|
|
|
EXPOSE 1313
|