Skip to content

Commit 7d57f51

Browse files
committed
Enhance README.md
1 parent ac0c5bf commit 7d57f51

File tree

1 file changed

+60
-5
lines changed

1 file changed

+60
-5
lines changed

README.md

+60-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,75 @@
11
# docker-gitbook
22

3-
[![Docker Build Statu](https://img.shields.io/docker/build/yanqd0/gitbook.svg)](https://hub.docker.com/r/yanqd0/gitbook/builds/)
4-
[![Docker Automated buil](https://img.shields.io/docker/automated/yanqd0/gitbook.svg)](https://hub.docker.com/r/yanqd0/gitbook/builds/)
3+
[![Docker Build Status](https://img.shields.io/docker/build/yanqd0/gitbook.svg)](https://hub.docker.com/r/yanqd0/gitbook/builds/)
4+
[![Docker Automated build](https://img.shields.io/docker/automated/yanqd0/gitbook.svg)](https://hub.docker.com/r/yanqd0/gitbook/builds/)
55
[![Docker Stars](https://img.shields.io/docker/stars/yanqd0/gitbook.svg)](https://hub.docker.com/r/yanqd0/gitbook/)
66
[![Docker Pulls](https://img.shields.io/docker/pulls/yanqd0/gitbook.svg)](https://hub.docker.com/r/yanqd0/gitbook/)
77

8+
The smallest gitbook docker image built from Alpine.
9+
10+
## Install
11+
12+
```sh
13+
docker pull yanqd0/gitbook
14+
```
15+
16+
## Usage
17+
18+
There are two simple ways to use it, `docker run` or `docker-compose up`.
19+
20+
In the gitbook project, execute `docker` commands.
21+
22+
```sh
23+
docker run -v $PWD:/srv/gitbook -p 4000:4000 yanqd0/gitbook
24+
```
25+
26+
I never run it like this, except for debug. I always prefer [docker-compose], which can be easily [installed] and used.
27+
28+
You can write your `docker-compose.yml` like this:
29+
30+
```yaml
31+
version: '2'
32+
services:
33+
gitbook:
34+
image: yanqd0/gitbook
35+
volumes:
36+
- .:/srv/gitbook
37+
ports:
38+
- 4000:4000
39+
```
40+
41+
And then, run `docker-compose up`.
42+
43+
There is a verified [example.docker-compose.yml].
44+
845
[![Build Status](https://travis-ci.org/yanqd0/docker-gitbook.svg?branch=master)](https://travis-ci.org/yanqd0/docker-gitbook)
946

10-
An unofficial gitbook docker image built from Alpine.
47+
[docker-compose]:https://github.com/docker/compose
48+
[installed]:https://docs.docker.com/compose/install/
49+
[example.docker-compose.yml]:https://github.com/yanqd0/docker-gitbook/blob/master/example.docker-compose.yml
1150

12-
This repository is inspired by [fellah/gitbook](https://hub.docker.com/r/fellah/gitbook/~/dockerfile/).
51+
## Version
52+
53+
| Name | Version |
54+
| ---- | ------- |
55+
| node | 7.9.0 |
56+
| npm | 4.2.0 |
57+
| GitBook CLI | 2.3.0 |
58+
| GitBook | 3.2.2 |
1359

1460
## License
1561

16-
[![License](https://img.shields.io/github/license/yanqd0/docker-gitbook.svg)](LICENSE)
62+
[![License](https://img.shields.io/github/license/yanqd0/docker-gitbook.svg)](https://github.com/yanqd0/docker-gitbook/blob/master/LICENSE)
63+
64+
This repository is inspired by [fellah/gitbook].
65+
66+
The base image is changed to Alpine [node], which makes it much smaller.
67+
The CMD is changed to `gitbook install && gitbook serve`, which will install [GitBook Plugins] before served.
1768

1869
> The MIT License (MIT)
1970
>
2071
> Copyright (c) 2017 [email protected]
72+
73+
[fellah/gitbook]:https://hub.docker.com/r/fellah/gitbook/~/dockerfile/
74+
[node]:https://hub.docker.com/_/node/
75+
[GitBook Plugins]:https://plugins.gitbook.com/

0 commit comments

Comments
 (0)