码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2021-06-03 18:06:56      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:exp   explicit   running   files   file   ring   http   mat   ini   

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

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

技术图片

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

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

标签:exp   explicit   running   files   file   ring   http   mat   ini   

原文地址:https://www.cnblogs.com/amadeuslee/p/14844455.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!