View on GitHub

docker-gitbook

The smallest gitbook docker image built from Alpine.

docker-gitbook

Docker Build Status Docker Automated build Docker Stars Docker Pulls

The smallest gitbook docker image built from Alpine.

Install

docker pull yanqd0/gitbook

Docker Hub: https://hub.docker.com/r/yanqd0/gitbook/

Usage

There are two simple ways to use it, docker run or docker-compose up.

docker run

In the gitbook project, execute the command below:

docker run -v $PWD:/srv/gitbook -p 4000:4000 yanqd0/gitbook

If your current directory is not your gitbook project, you can replace $PWD with the path.

docker-compose up

It is not a good way to use docker run in your production environment.

I prefer to use a docker-compose.yml file.

You can write a docker-compose.yml in your gitbook project like this:

version: '3'
services:
  gitbook:
    image: yanqd0/gitbook
    volumes:
      - .:/srv/gitbook
    ports:
      - 4000:4000

And then, run docker-compose up -d.

There is a verified docker-compose.yml for example.

Build Status

Version

Name Version
node 8.4.0
npm 5.3.0
GitBook CLI 2.3.2
GitBook 3.2.3

It is welcome to remind me about updates with issues.

Size

Status Size
Compressed
Extracted 190 MB

License

License

This repository is inspired by fellah/gitbook.

The base image is changed to Alpine node, which makes it much smaller. The CMD is changed to gitbook install && gitbook serve, which will install GitBook Plugins before served.

MIT License

Copyright (c) 2017 Yan QiDong yanqd0@outlook.com