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.

Dockerfile 819B

12345678910111213141516171819202122232425262728
  1. ##
  2. ## Step 1 - add content and build with Hugo
  3. ##
  4. FROM debian:stretch as hugo
  5. RUN apt-get -qq update \
  6. && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends python-pygments git ca-certificates asciidoctor \
  7. && rm -rf /var/lib/apt/lists/*
  8. ENV HUGO_VERSION 0.54.0
  9. ENV HUGO_BINARY hugo_extended_${HUGO_VERSION}_Linux-64bit.deb
  10. ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} /tmp/hugo.deb
  11. RUN dpkg -i /tmp/hugo.deb \
  12. && rm /tmp/hugo.deb
  13. ADD . /tmp/site
  14. RUN hugo -b https://kb.chameth.com/ -v -s /tmp/site -d /tmp/hugo && \
  15. cp /tmp/hugo/index.xml /tmp/hugo/feed.xml
  16. ##
  17. ## Step 3 - host!
  18. ##
  19. FROM nginx:mainline-alpine AS nginx
  20. RUN rm -rf /usr/share/nginx/html/*
  21. COPY --from=hugo /tmp/hugo /usr/share/nginx/html
  22. ADD nginx.conf /etc/nginx/nginx.conf