gethue.Dockerfile 616 B

12345678910111213141516171819202122232425262728
  1. FROM ubuntu:18.04 as build
  2. LABEL description="gethue.com website"
  3. RUN apt-get update -y && apt-get install -y \
  4. wget \
  5. python-pip \
  6. git
  7. RUN wget https://github.com/gohugoio/hugo/releases/download/v0.62.0/hugo_0.62.0_Linux-64bit.deb \
  8. && dpkg -i hugo*.deb \
  9. && rm hugo*.deb \
  10. && pip install Pygments
  11. # Need from root to get Git history for last date modified of posts
  12. ADD . /gethue
  13. WORKDIR /gethue
  14. RUN hugo --source docs/gethue --baseURL ""
  15. FROM nginx:1.17-alpine
  16. ARG lang=en
  17. COPY --from=build /gethue/docs/gethue/public/${lang} /usr/share/nginx/html
  18. EXPOSE 80
  19. CMD ["nginx", "-g", "daemon off;"]