|
|
@ -0,0 +1,34 @@ |
|
|
|
# Use Alpine Linux as our base image so that we minimize the overall size our final container, and minimize the surface area of packages that could be out of date. |
|
|
|
FROM alpine:3.9@sha256:b3dbf31b77fd99d9c08f780ce6f5282aba076d70a513a8be859d8d3a4d0c92b8 |
|
|
|
|
|
|
|
LABEL description="Docker container for building static sites with the Hugo static site generator." |
|
|
|
LABEL maintainer="Johannes Mitlmeier <dev.jojomi@yahoo.com>" |
|
|
|
LABEL maintainer="Drew Short <warrick@sothr.com>" |
|
|
|
|
|
|
|
# config |
|
|
|
ARG HUGO_VERSION=0.61 |
|
|
|
ENV HUGO_TYPE=_extended |
|
|
|
ENV HUGO_ID=hugo${HUGO_TYPE}_${HUGO_VERSION} |
|
|
|
|
|
|
|
VOLUME /src |
|
|
|
VOLUME /output |
|
|
|
|
|
|
|
WORKDIR /src |
|
|
|
CMD ["/run.sh"] |
|
|
|
|
|
|
|
EXPOSE 1313 |
|
|
|
|
|
|
|
COPY ./run.sh /run.sh |
|
|
|
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_ID}_Linux-64bit.tar.gz /tmp |
|
|
|
RUN tar -xf /tmp/${HUGO_ID}_Linux-64bit.tar.gz -C /tmp \ |
|
|
|
&& mkdir -p /usr/local/sbin \ |
|
|
|
&& mv /tmp/hugo /usr/local/sbin/hugo \ |
|
|
|
&& rm -rf /tmp/${HUGO_ID}_linux_amd64 \ |
|
|
|
&& rm -rf /tmp/${HUGO_ID}_Linux-64bit.tar.gz \ |
|
|
|
&& rm -rf /tmp/LICENSE.md \ |
|
|
|
&& rm -rf /tmp/README.md |
|
|
|
|
|
|
|
RUN apk add --update git asciidoctor libc6-compat libstdc++ tar \ |
|
|
|
&& apk upgrade \ |
|
|
|
&& apk add --no-cache ca-certificates \ |
|
|
|
&& chmod 0777 /run.sh |