Contains the Docker definition and Concourse pipeline for generating a Hugo container image
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2 KiB

  1. # 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.
  2. FROM alpine:3.9@sha256:b3dbf31b77fd99d9c08f780ce6f5282aba076d70a513a8be859d8d3a4d0c92b8
  3. LABEL description="Docker container for building static sites with the Hugo static site generator."
  4. LABEL maintainer="Johannes Mitlmeier <dev.jojomi@yahoo.com>"
  5. LABEL maintainer="Drew Short <warrick@sothr.com>"
  6. # config
  7. ARG HUGO_VERSION=0.61.0
  8. ENV HUGO_TYPE=_extended
  9. ENV HUGO_ID=hugo${HUGO_TYPE}_${HUGO_VERSION}
  10. VOLUME /src
  11. VOLUME /output
  12. WORKDIR /src
  13. CMD ["/run.sh"]
  14. EXPOSE 1313
  15. COPY ./run.sh /run.sh
  16. ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_ID}_Linux-64bit.tar.gz /tmp
  17. RUN tar -xf /tmp/${HUGO_ID}_Linux-64bit.tar.gz -C /tmp \
  18. && mkdir -p /usr/local/sbin \
  19. && mv /tmp/hugo /usr/local/sbin/hugo \
  20. && rm -rf /tmp/${HUGO_ID}_linux_amd64 \
  21. && rm -rf /tmp/${HUGO_ID}_Linux-64bit.tar.gz \
  22. && rm -rf /tmp/LICENSE.md \
  23. && rm -rf /tmp/README.md
  24. RUN apk add --update git asciidoctor libc6-compat libstdc++ tar \
  25. && apk upgrade \
  26. && apk add --no-cache ca-certificates \
  27. && chmod 0777 /run.sh