Sign inSign up

shuoshuo/gitbook-builder

By shuoshuo

•Updated over 10 years ago

A Docker Image for building PDF ebook with Gitbook and CJK Fonts

Image
4

3.0K

shuoshuo/gitbook-builder repository overview

⁠docker-gitbook-builder

A Docker Image for building ebook with Gitbook⁠ and Noto CJK Fonts⁠.

Docker Hub: https://hub.docker.com/r/shuoshuo/gitbook-builder/⁠

⁠Basic

Read the official documentation GitbookIO/gitbook⁠ first.

# run
docker run --name="gitbook-builder" -v "$PWD:/home" shuoshuo/gitbook-builder

⁠Integrate with Gitlab CI

This docker image is originally designed for generating ebook with Gitlab CI⁠. You could configure your Gitlab CI as following:

before_script:
  - env
  - export LC_ALL=zh_TW.UTF-8

stages:
  - build

ebook:
  stage: build
  script:
    - gitbook pdf
  artifacts:
    paths:
      - book.pdf
  only:
    - master
  tags:
    - gitbook
  image: shuoshuo/gitbook-builder:latest
  allow_failure: true

⁠Additional Features

This docker image also has OpenJDK 7⁠ installed. The Java runtime allows you to run Gitbook PlantUML⁠ plugin.

⁠Customization

To install your own favorite fonts, add the following RUN command in Dockerfile

## Install Fonts
RUN apt-get update && \
    apt-get install -y --no-install-recommends your-favorite-fonts && \
    rm -rf /var/lib/apt/lists/*

Tag summary

Content type

Image

Digest

Size

461.6 MB

Last updated

over 10 years ago

docker pull shuoshuo/gitbook-builder