Sign inSign up

zhanyi/gitbook

By zhanyi

Updated almost 9 years ago

An image for GitBook building, testing.

Image
1

3.2K

zhanyi/gitbook repository overview

zhanyi/gitbook

Docker Stars Docker Pulls Docker Automated build Docker Build Statu

Usage

Run container:

$ docker run -p 80:4000 -v /srv/gitbook zhanyi/gitbook

4000 – GitBook default service port.

35729 – Live reload server port.

/srv/gitbook – Default working directory for GitBook container.

Build Static Website

$ docker run -v /srv/gitbook -v /srv/html zhanyi/gitbook gitbook build . /srv/html

Gitlab CI

Build a website and publish to gitlab pages.

# requiring the environment of NodeJS 4.2.2
image: zhanyi/gitbook:latest
# add 'node_modules' to cache for speeding up builds
cache:
  paths:
  - node_modules/ # Node modules and dependencies
before_script:
  # This cause runner become slow.
  #- npm install gitbook-cli -g # install gitbook
  #- gitbook fetch latest # fetch latest stable version
  #- gitbook fetch pre # fetch latest pre-release version
  #- gitbook fetch 2.6.7 # fetch specific version
# the 'pages' job will deploy and build your site to the 'public' path
pages:
  stage: deploy
  script:
    - gitbook build book public # build to public path
  artifacts:
    paths:
      - public
  only:
    - master # this job will affect only the 'master' branch

GitHub: GitBook

GitBook Toolchain Documentation

Tag summary

Content type

Image

Digest

Size

105.1 MB

Last updated

almost 9 years ago

docker pull zhanyi/gitbook