其他分享
首页 > 其他分享> > 【Vegas原创】Gitbook的docker安装配置

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

作者:互联网

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

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

image

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]#

标签:info,gitbook,loading,OK,version,...,Gitbook,Vegas,docker
来源: https://www.cnblogs.com/amadeuslee/p/14844455.html