【Vegas原创】Gitbook的docker安装配置

1.创建目录:/gitbook/gitbook 和 /gitbook/html

2. /gitbook/gitbook目录下,touch新建README.md  SUMMARY.md

【Vegas原创】Gitbook的docker安装配置

3. docker安装gitbook

docker run --name gitbook \
-p 4000:4000  \
-v /gitbook/gitbook:/srv/gitbook \
-v /gitbook/html:/srv/html \
fellah/gitbook

4.docker进入gitbook,进行初始化

[root@it ]# docker exec -it 9c9a975c58b8 /bin/sh
# ls
README.md  SUMMARY.md  _book
# gitbook

  Usage: gitbook [options] [command]


  Commands:

    ls                        List versions installed locally
    current                   Display currently activated version
    ls-remote                 List remote versions available for install
    fetch [version]           Download and install a <version>
    alias [folder] [version]  Set an alias named <version> pointing to <folder>
    uninstall [version]       Uninstall a version
    update [tag]              Update to the latest version of GitBook
    help                      List commands for GitBook
    *                         run a command with a specific gitbook version

  Options:

    -h, --help               output usage information
    -v, --gitbook [version]  specify GitBook version to use
    -d, --debug              enable verbose error
    -V, --version            Display running versions of gitbook and gitbook-cli
# gitbook init
info: create SUMMARY.md 
info: initialization is finished

5.每次改动md源文件后,都要重新构建,命令:

[root@it gitbook]# docker exec gitbook gitbook build . /srv/html
info: 7 plugins are installed 
info: 6 explicitly listed 
info: loading plugin "highlight"... OK 
info: loading plugin "search"... OK 
info: loading plugin "lunr"... OK 
info: loading plugin "sharing"... OK 
info: loading plugin "fontsettings"... OK 
info: loading plugin "theme-default"... OK 
info: found 1 pages 
info: found 0 asset files 
info: >> generation finished with success in 0.9s ! 
[root@it gitbook]#
上一篇:Anaconda启动的时候一直停在loading applications不动的解决方案


下一篇:element-ui 局部加载loading