Browse Source

Add 'Dockerfile'

天问 1 year ago
parent
commit
9bf81382a5
1 changed files with 30 additions and 0 deletions
  1. 30 0
      Dockerfile

+ 30 - 0
Dockerfile

@@ -0,0 +1,30 @@
+FROM registry.cn-hangzhou.aliyuncs.com/kennylee/node:12.2-stretch
+
+ENV BOOKDIR /gitbook
+
+# Basic Requirements
+RUN \
+  apt-get update && \
+  apt-get install -y calibre apt-utils
+
+# install fonts
+RUN apt-get install -y fonts-wqy-microhei
+
+RUN cnpm install gitbook-cli -g && \
+    cnpm install svgexport -g
+    
+ENV GIT_BOOK_VERSION="3.2.3"
+RUN gitbook fetch $GIT_BOOK_VERSION
+
+# install recommend plugins
+
+RUN apt-get clean && \
+    rm -rf /var/lib/apt/lists/*
+
+VOLUME $BOOKDIR
+WORKDIR $BOOKDIR
+
+EXPOSE 4000
+
+ENTRYPOINT ["gitbook"]
+CMD ["--help"]