1
mirror of https://github.com/jakejarvis/hugo-docker.git synced 2025-07-01 15:46:41 -04:00

Compare commits

...

8 Commits

Author SHA1 Message Date
54f06a59e8 Hugo v0.81.0
also force AMD64 base image (ran into problems with Docker on Apple Silicon since there's no ARM Linux version of Hugo)
2021-02-20 22:57:25 -05:00
51c9c67055 Hugo v0.80.0 2021-01-02 10:13:59 -05:00
a105355628 Hugo v0.79.1 2020-12-19 11:09:19 -05:00
3f5b9205b7 Hugo v0.79.0 2020-11-27 10:00:57 -05:00
fcadd19550 Hugo v0.78.2 2020-11-17 10:11:39 -05:00
a956a18e6c add org.opencontainers.image.source label
https://docs.github.com/en/free-pro-team@latest/packages/managing-container-images-with-github-container-registry/connecting-a-repository-to-a-container-image#connecting-a-repository-to-a-container-image-on-the-command-line
2020-11-17 09:22:42 -05:00
c6fc7fd110 Hugo v0.78.1 2020-11-05 09:26:03 -05:00
a649d18bcb Hugo v0.78.0 2020-11-03 08:43:43 -05:00

View File

@ -1,9 +1,9 @@
# Hugo doesn't require Go to run, *except* if you're using Hugo Modules. It's
# much easier to install Node on the Go base image than vice-versa.
FROM golang:1.15-alpine
FROM amd64/golang:1.16-alpine
# the following version can be overridden at image build time with --build-arg
ARG HUGO_VERSION=0.77.0
ARG HUGO_VERSION=0.81.0
# remove/comment the following line completely to build with vanilla Hugo:
ARG HUGO_EXTENDED=1
@ -12,6 +12,9 @@ LABEL repository="https://github.com/jakejarvis/hugo-docker"
LABEL homepage="https://jarv.is/"
LABEL maintainer="Jake Jarvis <jake@jarv.is>"
# https://docs.github.com/en/free-pro-team@latest/packages/managing-container-images-with-github-container-registry/connecting-a-repository-to-a-container-image#connecting-a-repository-to-a-container-image-on-the-command-line
LABEL org.opencontainers.image.source https://github.com/jakejarvis/hugo-docker
# only install libc6-compat & libstdc++ if we're building extended Hugo
# https://gitlab.com/yaegashi/hugo/commit/22f0d5cbd6114210ba7835468facbdee60609aa2
RUN apk update && \
@ -25,8 +28,10 @@ RUN apk update && \
py3-pip \
ruby \
${HUGO_EXTENDED:+libc6-compat libstdc++} && \
update-ca-certificates && \
npm install --global postcss postcss-cli autoprefixer @babel/core @babel/cli && \
update-ca-certificates
# download Hugo and miscellaneous optional dependencies
RUN npm install --global postcss postcss-cli autoprefixer @babel/core @babel/cli && \
pip3 install --upgrade Pygments==2.* && \
gem install asciidoctor && \
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_EXTENDED:+extended_}${HUGO_VERSION}_Linux-64bit.tar.gz && \
@ -37,6 +42,11 @@ RUN apk update && \
chmod +x /usr/local/bin/hugo && \
rm -rf hugo_* LICENSE README.md
# fix potential stack size problems on Alpine
# https://github.com/microsoft/vscode-dev-containers/blob/fb63f7e016877e13535d4116b458d8f28012e87f/containers/hugo/.devcontainer/Dockerfile#L19
RUN go get github.com/yaegashi/muslstack && \
muslstack -s 0x800000 /usr/local/bin/hugo
# verify everything's OK, exit otherwise
RUN hugo version && \
hugo env && \