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 854B

1234567891011121314151617181920212223242526272829
  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 ruby \
  7. && rm -rf /var/lib/apt/lists/* \
  8. && gem install asciidoctor pygments.rb
  9. ENV HUGO_VERSION 0.54.0
  10. ENV HUGO_BINARY hugo_extended_${HUGO_VERSION}_Linux-64bit.deb
  11. ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} /tmp/hugo.deb
  12. RUN dpkg -i /tmp/hugo.deb \
  13. && rm /tmp/hugo.deb
  14. ADD . /tmp/site
  15. RUN hugo -b https://kb.chameth.com/ -v -s /tmp/site -d /tmp/hugo && \
  16. cp /tmp/hugo/index.xml /tmp/hugo/feed.xml
  17. ##
  18. ## Step 3 - host!
  19. ##
  20. FROM nginx:mainline-alpine AS nginx
  21. RUN rm -rf /usr/share/nginx/html/*
  22. COPY --from=hugo /tmp/hugo /usr/share/nginx/html
  23. ADD nginx.conf /etc/nginx/nginx.conf