├── Dockerfile └── README.md /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:6-slim 2 | 3 | MAINTAINER Roman Krivetsky 4 | 5 | ARG VERSION=3.2.1 6 | 7 | LABEL version=$VERSION 8 | 9 | RUN npm install --global gitbook-cli &&\ 10 | gitbook fetch ${VERSION} &&\ 11 | npm cache clear &&\ 12 | rm -rf /tmp/* 13 | 14 | WORKDIR /srv/gitbook 15 | 16 | VOLUME /srv/gitbook /srv/html 17 | 18 | EXPOSE 4000 35729 19 | 20 | CMD /usr/local/bin/gitbook serve 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitBook Image 2 | 3 | Run container: 4 | 5 | ``` 6 | $ docker run -p 80:4000 -v /srv/gitbook fellah/gitbook 7 | ``` 8 | 9 | `4000` – GitBook default service port. 10 | 11 | `35729` – Live reload server port. 12 | 13 | `/srv/gitbook` – Default working directory for GitBook container. 14 | 15 | 16 | ## Build Static Website 17 | 18 | ``` 19 | $ docker run -v /srv/gitbook -v /srv/html fellah/gitbook gitbook build . /srv/html 20 | ``` 21 | 22 | ## Links 23 | 24 | [GitHub: GitBook](https://github.com/GitbookIO/gitbook) 25 | 26 | [GitBook Toolchain Documentation](http://toolchain.gitbook.com) 27 | --------------------------------------------------------------------------------