初始提交
要提交的变更:
新文件: Dockerfile
新文件: README.rst
新文件: mermaid/config.json
新文件: mermaid/puppeteer-config.json
Signed-off-by: Wei, Jing <jwei@linx-info.com>
This commit is contained in:
52
Dockerfile
Normal file
52
Dockerfile
Normal file
@@ -0,0 +1,52 @@
|
||||
FROM debian:11
|
||||
|
||||
WORKDIR /docs
|
||||
|
||||
RUN rm /etc/apt/sources.list
|
||||
RUN echo "deb http://mirrors.rd.in.linx/debian/ bullseye main non-free contrib \n\
|
||||
deb http://mirrors.rd.in.linx/debian/ bullseye-updates main non-free contrib\n\
|
||||
deb http://mirrors.rd.in.linx/debian/ bullseye-backports main non-free contrib\n" > /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
python3-pip \
|
||||
latexmk \
|
||||
texlive-xetex \
|
||||
texlive-lang-chinese \
|
||||
latex-cjk-all \
|
||||
python3-pygments \
|
||||
fonts-freefont-otf \
|
||||
git \
|
||||
xindy \
|
||||
python3-dev \
|
||||
zlib1g-dev \
|
||||
libjpeg-dev \
|
||||
node-mermaid \
|
||||
apt-utils \
|
||||
sshpass \
|
||||
wget \
|
||||
bash \
|
||||
npm \
|
||||
libgbm1 \
|
||||
libasound2 \
|
||||
locales \
|
||||
graphviz
|
||||
RUN apt-get autoremove \
|
||||
&& apt-get clean \
|
||||
&& rm /var/cache/apt/archives/*.deb /root/.cache/ /var/lib/apt/lists/* -rf
|
||||
RUN pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple
|
||||
RUN pip3 install sphinx \
|
||||
sphinxcontrib-mermaid \
|
||||
sphinxcontrib-tikz \
|
||||
sphinx_rtd_theme \
|
||||
docxbuilder \
|
||||
docxbuilder[math] \
|
||||
sphinxcontrib-bibtex \
|
||||
sphinxcontrib-blockdiag
|
||||
RUN pip3 install git+http://gitlab.rd.in.linx/GNU/linuxdoc.git
|
||||
RUN npm config set registry https://registry.npm.taobao.org
|
||||
RUN cd /usr/local/; npm install @mermaid-js/mermaid-cli
|
||||
RUN mkdir /usr/local/etc/mermaid
|
||||
ADD mermaid/config.json /usr/local/etc/mermaid/config.json
|
||||
ADD mermaid/puppeteer-config.json /usr/local/etc/mermaid/puppeteer-config.json
|
||||
ENV PS1='Sphinx-builder#'
|
||||
23
README.rst
Normal file
23
README.rst
Normal file
@@ -0,0 +1,23 @@
|
||||
使用说明
|
||||
=========
|
||||
|
||||
构建镜像
|
||||
---------
|
||||
|
||||
docker build -t sphinx-doc .
|
||||
|
||||
查看镜像
|
||||
---------
|
||||
|
||||
docker images | grep sphinx-doc
|
||||
|
||||
使用镜像
|
||||
---------
|
||||
|
||||
docker run --rm -v 本地文档所在目录:/docs sphinx-doc:latest make latexpdf
|
||||
|
||||
docker run --rm -v /tmp/doc:/docs sphinx-doc:latest make latexpdf
|
||||
|
||||
|
||||
|
||||
|
||||
14
mermaid/config.json
Normal file
14
mermaid/config.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"startOnLoad": true,
|
||||
"flowchart": {
|
||||
"useMaxWidth": false,
|
||||
"htmlLabels": true
|
||||
},
|
||||
"sequence": {
|
||||
"height": 40,
|
||||
"actorMargin": 80,
|
||||
"mirrorActors": false,
|
||||
"bottomMarginAdj": 1
|
||||
},
|
||||
"theme": "default"
|
||||
}
|
||||
5
mermaid/puppeteer-config.json
Normal file
5
mermaid/puppeteer-config.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"args": [
|
||||
"--no-sandbox"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user