website/Dockerfile

38 lines
1.1 KiB
Docker

# 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.
# Bump this by 1 whenever you change the Dockerfile below, e.g. if
# `DOCKERFFILE_VERSION=1` then change this to `DOCKERFILE_VERSION=2` when you
# change something else in this file.
# DOCKERFILE_VERSION=0
FROM alpine:latest
LABEL maintainer="Luc Perkins <lperkins@linuxfoundation.org>"
RUN apk add --no-cache \
curl \
git \
openssh-client \
rsync \
build-base \
libc6-compat \
npm && \
npm install -G 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
EXPOSE 1313