Sign inSign up

allfunc/mdbook

By allfunc

•Updated 15 days ago

Image
Languages & frameworks
Integration & delivery
Content management system
3

6.3K

allfunc/mdbook repository overview

CircleCI Docker Pulls

⁠docker-mdbook (Alpine)

A set of tool for mdbook.

PackageVersion
mdbook0.5.4
mdbook-toc0.15.4
mdbook-mermaid0.17.1
mermaid (NPM/JS)11.12.0
mdbook-plantuml2.0.0
Rust (builder)1.99.0

⁠Upgrade

Bump all of these together — a missed file ships a stale image tag.

FileWhat to change
docker/mybook/Cargo.tomlversion pins in [package.metadata.bin] and [dependencies]
docker/mybook/Cargo.lockregenerate with cargo update (below)
Dockerfilebuilder image tag, ARG RUST_VER, and the four .bin/rust-${RUST_VER}/<crate>/<version>/bin/... paths
README.mdthe version table above
.env.buildVERSION= — drives the Docker tag, the CircleCI matrix and the test build arg
.circleci/config.ymldocker-tag: under base-matrix
⁠cargo update

docker/mybook is a dummy crate whose only job is to pin the mdBook binaries. cargo-run-bin installs from [package.metadata.bin] (the RUN cargo bin --install step in the Dockerfile), and mdbook is locked = true, so the committed Cargo.lock decides which version gets installed.

cd docker/mybook

# 1. edit [package.metadata.bin] and [dependencies] in Cargo.toml to the new versions
#    (e.g. mdbook = "0.5.4"), then

# 2. refresh the lockfile
cargo update

# 3. check what got resolved
grep -A1 '^name = "mdbook' Cargo.lock

cargo update on its own only moves versions inside the semver ranges already in Cargo.toml — edit Cargo.toml first when jumping minor/major.

To generate the lockfile with the same toolchain the build uses:

docker run --rm -v "$PWD/docker/mybook:/home/rust/src" -w /home/rust/src \
  allfunc/rust-musl-crate:1.88.0 cargo update

Then build and smoke-test:

./compile.sh b
docker run --rm allfunc/mdbook -V

⁠GIT

⁠Docker hub

⁠Usage

  1. create SUMMARY.md file with such content.
# Summary

- [Chapter 1](./chapter_1.md)
  1. Copy bin/preview.sh to same folder.
  2. Run following command
./preview.sh start
⁠Curl Example
curl https://raw.githubusercontent.com/allfunc/docker-mdbook/main/bin/preview.sh | bash -s -- start

or

curl -L https://bit.ly/exec-mdbook | bash -s -- start
⁠import HTML
  • create any folder (such as public) inside src folder
<div data-import="/public/import-demo.html"></div>

⁠APP

⁠mdbook
⁠mdbook-toc
⁠mdbook-mermaid
⁠mdbook-plantuml
⁠mdbook-pandoc (disabled)

Pandoc is not installed in this image — see the commented apt-get line in install-packages.sh — so mdbook-pandoc is not bundled. The commented [output.pandoc.profile.pptx] block in mdbook-demo/book.toml is kept for reference.

If you enable it yourself, the pptx output sits at:

  • docker cp mdbook:/mdbook/book/pandoc/pptx/output.pptx .
⁠update docker image
docker pull allfunc/mdbook

⁠Troubleshooting

docker run --rm allfunc/mdbook -V
docker run -p 3888:3888 -e PORT=3888 \
    -u $(id -u):$(id -g) \
    -v $(pwd):/mdbook/src \
    --name mdbook \
    --rm allfunc/mdbook

⁠Official Doc

MIT 2026

Tag summary

Content type

Image

Digest

sha256:cfcbd022e…

Size

147.1 MB

Last updated

15 days ago

docker pull allfunc/mdbook