2020-07-14 16:58:22 +08:00
|
|
|
FROM node:14.4.0-alpine
|
2017-11-21 19:05:06 +08:00
|
|
|
|
|
|
|
ENV TZ=Asia/Shanghai
|
|
|
|
|
|
|
|
WORKDIR /srv/gitbook
|
|
|
|
|
|
|
|
COPY book.json book.json
|
|
|
|
|
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
|
|
|
2020-07-14 16:58:22 +08:00
|
|
|
RUN set -x && apk add --no-cache \
|
2020-10-14 00:40:07 +08:00
|
|
|
tzdata bash \
|
2017-11-21 19:05:06 +08:00
|
|
|
&& npm install -g gitbook-cli \
|
|
|
|
&& gitbook install \
|
|
|
|
&& ln -s /usr/local/bin/docker-entrypoint.sh / \
|
|
|
|
&& rm -rf /root/.npm /tmp/*
|
|
|
|
|
|
|
|
EXPOSE 4000
|
|
|
|
|
|
|
|
VOLUME /srv/gitbook-src
|
|
|
|
|
|
|
|
WORKDIR /srv/gitbook-src
|
|
|
|
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
|
|
|
|
|
|
CMD server
|