2015-12-08 17:03:19 +08:00
|
|
|
# Gitbook
|
|
|
|
# NAME: kennylee26/gitbook
|
|
|
|
|
|
|
|
# Pull base image.
|
2019-05-16 16:46:17 +08:00
|
|
|
FROM registry.cn-hangzhou.aliyuncs.com/kennylee/node:12.2-stretch
|
2015-12-08 17:03:19 +08:00
|
|
|
|
|
|
|
ENV BOOKDIR /gitbook
|
|
|
|
|
|
|
|
# Basic Requirements
|
|
|
|
RUN \
|
|
|
|
apt-get update && \
|
2019-05-16 16:46:17 +08:00
|
|
|
apt-get install -y calibre apt-utils
|
2015-12-29 15:01:00 +08:00
|
|
|
|
|
|
|
# install fonts
|
|
|
|
RUN apt-get install -y fonts-wqy-microhei
|
2015-12-08 17:03:19 +08:00
|
|
|
|
|
|
|
RUN cnpm install gitbook-cli -g && \
|
|
|
|
cnpm install svgexport -g
|
2019-05-16 16:46:17 +08:00
|
|
|
|
|
|
|
ENV GIT_BOOK_VERSION="3.2.3"
|
|
|
|
RUN gitbook fetch $GIT_BOOK_VERSION
|
2015-12-08 17:03:19 +08:00
|
|
|
|
2016-02-02 23:28:24 +08:00
|
|
|
# install recommend plugins
|
|
|
|
|
2015-12-08 17:03:19 +08:00
|
|
|
RUN apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
VOLUME $BOOKDIR
|
|
|
|
WORKDIR $BOOKDIR
|
|
|
|
|
|
|
|
EXPOSE 4000
|
|
|
|
|
|
|
|
# Define default command.
|
|
|
|
ENTRYPOINT ["gitbook"]
|
|
|
|
CMD ["--help"]
|