Sign inSign up

tomwhiston/hugo-build

By tomwhiston

Updated over 9 years ago

build a hugo site. Output to /usr/share/blog/public

Image
0

295

tomwhiston/hugo-build repository overview

FROM debian:wheezy
MAINTAINER [email protected]

# Install pygments (for syntax highlighting)
RUN apt-get -qq update \
	&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends python-pygments git ca-certificates python-dev \
	&& rm -rf /var/lib/apt/lists/*

ADD https://bootstrap.pypa.io/get-pip.py /tmp/get-pip.py

RUN python /tmp/get-pip.py && pip install awscli

ARG HUGO_VERSION
ENV HUGO_VERSION=${HUGO_VERSION:-"0.20.2"}

ENV HUGO_BINARY hugo_${HUGO_VERSION}-64bit.deb

# Download and install hugo
ADD https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} /tmp/hugo.deb
RUN dpkg -i /tmp/hugo.deb \
	&& rm /tmp/hugo.deb

# Create working directory
RUN mkdir /usr/share/blog
WORKDIR /usr/share/blog

# Automatically build site
ONBUILD ADD site/ /usr/share/blog

CMD hugo

Tag summary

Content type

Image

Digest

Size

123 MB

Last updated

over 9 years ago

docker pull tomwhiston/hugo-build