博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Docker安装gitbook
阅读量:4293 次
发布时间:2019-05-27

本文共 1401 字,大约阅读时间需要 4 分钟。

docker安装gitbook

启动容器

 

[root@monitor ~]# docker run -d --name gitbook \-p 4000:4000  \-v /data/gitbook/gitbook:/srv/gitbook \-v /data/gitbook/html:/srv/html \fellah/gitbook

/srv/gitbook 是gitbook工作目录,用来存放源文件,映射到了本地的/data/gitbook/gitbook

/srv/html 是构建后的html文件,可在WEB服务中查看,映射到了本地的/data/gitbook/html

编辑核心文件

请确保本地的gitbook目录中包含至少README.md和SUMMARY.md两个文件

 

[root@monitor gitbook]# cat /data/gitbook/gitbook/SUMMARY.md # Summary* [Introduction](README.md)* [Part I](part1/README.md)    * [Install Docker with CentOS8](part1/install_docker_with_centos8.md)[root@monitor ~]# cat /data/gitbook/gitbook/README.md # Introduction[root@monitor gitbook]# tree /data/gitbook/ -L 3/data/gitbook/├── gitbook│   ├── _book│   │   ├── gitbook│   │   ├── index.html│   │   ├── part1│   │   └── search_index.json│   ├── part1│   │   ├── install_docker_with_centos8.md│   │   └── README.md│   ├── README.md│   └── SUMMARY.md└── html    ├── gitbook    │   ├── fonts    │   ├── gitbook.js    │   ├── gitbook-plugin-fontsettings    │   ├── gitbook-plugin-highlight    │   ├── gitbook-plugin-lunr    │   ├── gitbook-plugin-search    │   ├── gitbook-plugin-sharing    │   ├── images    │   ├── style.css    │   └── theme.js    ├── index.html    ├── part1    │   ├── index.html    │   └── install_docker_with_centos8.html    └── search_index.json

重新构建

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

 

[root@monitor ~]# docker exec gitbook gitbook build . /srv/html

 

 

转载地址:http://wzyws.baihongyu.com/

你可能感兴趣的文章
Tomcat类加载机制
查看>>
for(;;) and while(true)
查看>>
CountDownLatch:闭锁
查看>>
关于系统与系统间调用时的逻辑健壮性
查看>>
notepad++的使用
查看>>
Spring使用@Value注解各种类型的值(Map,List,Set,数组,基本数据类型)
查看>>
搞懂Java ArrayList原码
查看>>
时间复杂度到底怎么算
查看>>
java8 日期时间类
查看>>
可重入锁
查看>>
IDEA 编辑之后保留缩进空格的设置
查看>>
MySQL limit offset的替代方案
查看>>
一点必要的感悟
查看>>
springboot Binder类
查看>>
java问题排查工具
查看>>
springboot的配置文件优先级,@ConfigurationProperties注解
查看>>
EnvironmentPostProcessor与spring.factories
查看>>
springboot没有加载application.yml文件的原因
查看>>
springboot conditional相关
查看>>
springboot @Configuration 和 @Import, @EnableAutoConfiguration 注解
查看>>