1 Star 0 Fork 1.2K

N2N/docker

forked from Kenny小狼/docker 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
alpine
assets
bind
cadvisor
centos
ci-html
ci-webhook/tomcat
consul
debian
elasticsearch
elk
etcd
finalspeed-serv
finebi
frp
git
gitbook
Dockerfile
README.md
gitlab-runner
gitlab
golang/1.8
gollum
gradle-node
gradle
grafana
healthcheck
http-proxy
java-nodejs
java
jenkins
jetbrains-license-server
kibana
logstash
loki
lts
mariadb
maven
mongo-db
mongo-express
mysql
nexus3
nfs
nginx-pureftpd
nginx
node-express
node
opencv
oracle-xe-11g
postgresql
prometheus
promtail
pure-ftpd
python
redis
redmine-git-integration
registry-frontend
registry
rocketmq
ruby
shadowsocks-libev
share-server
siege
socat
solr
sonarqube
springboot
sshd-tomcat
sshd
supervisord
symphony
tnginx
tomcat
ubuntu
weblogic
webui-aria2
zipkin
zookeeper/3.4.10
.editorconfig
.gitignore
LICENSE
README.md
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Gitbook

本地的gitbook创建命令工具(gitbook-cli),实际上可以把此容器看成的一个gitbook命令行的封装。

构建命令

docker build -t kennylee/gitbook .

GIT_BOOK_VERSION

GIT_BOOK_VERSION指的是gitbook版本,latest 为官网定义的稳定版本。如果发现latest版本使用有问题的话可以手动切换到开发版本。

默认镜像就安装了gitbook,若不安装的话每次使用镜像的时候都会重新下载gitbook

说明

  • 输出pdf乱码问题

    默认情况下pdf输出中文会乱码,因为默认字体不支持中文,所以镜像内安装了中文字体 WenQuanYi Micro Hei Mono , 然后在book.json里面配置输出字体。参考如下:

    {
        "pdf": {
        "pageNumbers": false,
        "fontSize": 12,
        "fontFamily": "WenQuanYi Micro Hei Mono",
        "paperSize": "a4",
        "margin": {
            "bottom": 36,
            "left": 62,
            "right": 62,
            "top": 36
        	},
        "footerTemplate": null,
        "headerTemplate": null
    	}
    }
    

使用教程

首先下载镜像 docker pull kennylee/gitbook

init

docker run --rm -v "$PWD:/gitbook" -p 4000:4000 kennylee/gitbook init

serve

docker run --rm -v "$PWD:/gitbook" -p 4000:4000 kennylee/gitbook serve

build

docker run --rm -v "$PWD:/gitbook" -p 4000:4000 kennylee/gitbook build

For short, you can use alias for the long command line text. Just place the alias statement in your .bashrc or .zshrc.

alias gitbook='docker run --rm -v "$PWD:/gitbook" -p 4000:4000 kennylee/gitbook'

设置别名后,直接 gitbook build 即可

注:若build一次不成功可以继续build一次,莫名发现会产生这个问题。也许是跟编写的SUMMARY.md等文件有关。

init

gitbook init

serve

gitbook serve

build

gitbook build


参考 https://hub.docker.com/r/billryan/gitbook/

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Docker
1
https://gitee.com/N2N/docker.git
git@gitee.com:N2N/docker.git
N2N
docker
docker
master

搜索帮助