Skip to content

Instantly share code, notes, and snippets.

@takuti
Created January 21, 2018 23:12
Show Gist options
  • Save takuti/b5c6851cf175c852410f96f9cea26dc1 to your computer and use it in GitHub Desktop.
Save takuti/b5c6851cf175c852410f96f9cea26dc1 to your computer and use it in GitHub Desktop.
Mock dockerfile for takuti.me
FROM node:alpine
ENV HUGO_VERSION=0.30.2
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz /tmp
ADD . /src
WORKDIR /src
RUN \
# install hugo
tar -xf /tmp/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -C /tmp \
&& mkdir -p /usr/local/sbin \
&& mv /tmp/hugo /usr/local/sbin/hugo \
&& rm -rf /tmp/* \
# install npm packages for building Hugo site
&& apk add --no-cache --virtual .builddeps g++ make python \
&& npm install -g gulp \
&& npm install \
&& apk del .builddeps \
&& gulp
EXPOSE 1313
CMD ["/usr/local/sbin/hugo", "server"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment