Alpine base Docker Image for rust-lang/mdBook.
ghcr.io/peaceiris/mdbook is also available.
Image tag | Base Image | Image size | Notes |
---|---|---|---|
peaceiris/mdbook:v0.x.x |
alpine:3.12 |
22.2MB | Small image |
peaceiris/mdbook:v0.x.x-rust |
rust:1.49-alpine3.12 |
508MB | mdbook test subcommand is available |
Create your docker-compose.yml
like the following.
version: '3'
services:
mdbook:
container_name: mdbook
image: peaceiris/mdbook:v0.x.x
# image: peaceiris/mdbook:v0.x.x-rust
stdin_open: true
tty: true
ports:
- 3000:3000
- 3001:3001
volumes:
- ${PWD}:/book
command:
- serve
- --hostname
- '0.0.0.0'
# Run "mdbook serve"
docker-compose up
# Run a command of mdBook
docker-compose run --rm mdbook init
The mdBook Setup GitHub Action is recommended.