Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

license release GitHub release date GitHub Actions status

Docker image for mdBook

Alpine Base Docker Image for mdBook

Alpine base Docker Image for rust-lang/mdBook.

DockerHub Badge

Docker images on GitHub Packages ghcr.io/peaceiris/mdbook are also available.

Getting started

Image tag Base Image Image size Notes
peaceiris/mdbook:v0.x.x alpine:3.14 24MB Minimum image
peaceiris/mdbook:v0.x.x-rust rust:1.55-alpine3.14 880MB mdbook test subcommand is available
ghcr.io/peaceiris/mdbook:v0.x.x alpine:3.14 24MB GitHub Packages: Minimum image
ghcr.io/peaceiris/mdbook:v0.x.x-rust rust:1.55-alpine3.14 880MB GitHub Packages: mdbook test subcommand is available

Docker Compose

Create your docker-compose.yml like the following.

version: '3'

services:
  mdbook:
    container_name: mdbook
    image: peaceiris/mdbook:v0.x.x            # Minimum image
    # image: peaceiris/mdbook:v0.x.x-rust     # `mdbook test` subcommand is available
    # image: ghcr.io/peaceiris/mdbook:v0.x.x  # Docker images on GitHub Packages
    stdin_open: true
    tty: true
    ports:
      - 3000:3000
      - 3001:3001
    volumes:
      - ${PWD}:/book
    command:
      - serve
      - --hostname
      - '0.0.0.0'

Usage

# Run "mdbook serve"
docker-compose up

# Run a command of mdBook
docker-compose run --rm mdbook init

GitHub Actions for mdBook

The mdBook Setup GitHub Action is recommended.

License

About the author