Public | Automated Build

Last pushed: 2 years ago
Short Description
A Docker Image for building PDF ebook with Gitbook and CJK Fonts
Full Description

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/*
Docker Pull Command
Owner
shuoshuo
Source Repository