Alpine-based Docker Image for mdbook and mdbook-katex.
You can pull latest
(about 10MB
) or latest-slim
(about 5MB
, recommend) tag with command:
docker pull eliyip/mdbook-katex:latest-slim
Then use like this(project
stores your mdbook files):
docker run --rm -v ./project:/book eliyip/mdbook-katex:latest-slim
Or you can use it for preview with docker compose
:
version: '3'
services:
mdbook:
image: eliyip/mdbook-katex:latest-slim
container_name: mdbook
ports:
- 3000:3000
volumes:
- ${PWD}:/book
command:
- serve
- --hostname
- '0.0.0.0'
An example CI/CD drone configure:
kind: pipeline
type: docker
name: default
steps:
- name: build
image: eliyip/mdbook-katex:latest-slim
commands:
- mdbook build
- name: deploy
image: drillster/drone-rsync
settings:
recursive: true
delete: true
args: "--backup"
source: /drone/src/book/
target:
from_secret: remote_target
hosts:
from_secret: ssh_host
user:
from_secret: ssh_username
key:
from_secret: ssh_key
port:
from_secret: ssh_port