Skip to content

systemmining/docker-gitbook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

docker-gitbook

A Docker Container for gitbook. Inspired by

Docker Hub: https://hub.docker.com/r/billryan/gitbook/

Usage

Read the official GitBook Toolchain Documentation documentation GitbookIO/gitbook first.

# init
docker run --rm -v "$PWD:/gitbook" -p 4000:4000 billryan/gitbook gitbook init
# serve
docker run --rm -v "$PWD:/gitbook" -p 4000:4000 billryan/gitbook gitbook serve
# build
docker run --rm -v "$PWD:/gitbook" -p 4000:4000 billryan/gitbook gitbook build

For short, you can use alias for the long command line text. Place the alias statement in your .bashrc or .zshrc.

alias gitbook='docker run --rm -v "$PWD":/gitbook -p 4000:4000 billryan/gitbook gitbook'
# init
gitbook init
# serve
gitbook serve
# build
gitbook build
# pdf output
gitbook pdf .

User Priviledge

Since docker can not config uid and gid for shared volume properly(see Issue #7198), you can build it with your own uid and gid in the Dockerfile.

Features

Build your favourite fonts with GitBook(PDF, EPUB). Visit billryan/gitbook/tags to see whether your favourite languages/fonts are listed here. You can also check the GitHub branch since the docker hub is automated-build from GitHub.

Contributing

Wanna nice fonts for your GitBook? Here we go!

  1. checkout a new branch named with your languages and fonts. The name of languages should follow the List of ISO 639-2 codes and rfc4646, and the length of the name should as short as possible.
git checkout -b new-branch master
  1. Modify the following lines with your favourite fonts.
# install fonts
RUN apt-get update \
        && apt-get install -y fonts-your-language

License

The MIT License (MIT)

About

Docker image for GitBook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published