Dockerfile 545 B

123456789101112131415161718192021222324252627282930
  1. FROM registry.cn-hangzhou.aliyuncs.com/kennylee/node:12.2-stretch
  2. ENV BOOKDIR /gitbook
  3. # Basic Requirements
  4. RUN \
  5. apt-get update && \
  6. apt-get install -y calibre apt-utils
  7. # install fonts
  8. RUN apt-get install -y fonts-wqy-microhei
  9. RUN cnpm install gitbook-cli -g && \
  10. cnpm install svgexport -g
  11. ENV GIT_BOOK_VERSION="3.2.3"
  12. RUN gitbook fetch $GIT_BOOK_VERSION
  13. # install recommend plugins
  14. RUN apt-get clean && \
  15. rm -rf /var/lib/apt/lists/*
  16. VOLUME $BOOKDIR
  17. WORKDIR $BOOKDIR
  18. EXPOSE 4000
  19. ENTRYPOINT ["gitbook"]
  20. CMD ["--help"]