Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (26 sloc) 1.25 KB
FROM arm64v8/debian:stable
MAINTAINER fredix@protonmail.com
# Install pygments (for syntax highlighting)
RUN apt-get -qq update \
&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends python-pygments git-core curl unzip \
&& rm -rf /var/lib/apt/lists/*
# Download and install hugo
ENV HUGO_VERSION 0.38.2
ENV HUGO_BINARY hugo_${HUGO_VERSION}_Linux-ARM64
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY}.tar.gz /usr/local/
RUN tar xzf /usr/local/${HUGO_BINARY}.tar.gz -C /tmp/ \
&& cp /tmp/hugo /usr/local/bin/hugo \
&& rm /usr/local/${HUGO_BINARY}.tar.gz
# Create working directory
RUN mkdir /usr/share/blog
ADD https://github.com/fredix/fredix.xyz/archive/master.zip /tmp/
RUN unzip /tmp/master.zip -d /usr/share/blog/ && rm /tmp/master.zip
WORKDIR /usr/share/blog/fredix.xyz-master
# Expose default hugo port
EXPOSE 1313
# Automatically build site
ONBUILD ADD . /usr/share/blog/fredix.xyz-master
# By default, serve site
ENV HUGO_BASE_URL http://fredix.xyz
# CMD /usr/local/bin/hugo server --baseUrl=${HUGO_BASE_URL} --theme=fredix --watch --appendPort=false
CMD /usr/local/bin/hugo server -s /usr/share/blog/fredix.xyz-master --baseUrl=${HUGO_BASE_URL} --watch --appendPort=false --bind=0.0.0.0