Skip to content

foliant-docs/docker

Repository files navigation

Docker

Docker is a project that helps develop, update and publish Docker images for Foliant.

Overview

There are four Docker images to build different versions of Foliant. This repo contains Dockerfiles to build each Docker image. Also, each Dockerfile has its own build-and-publish script to publish images to Github Container registry.

Docker images dependencies

Docker images build with Dockerfiles based on a previous light version in the following order:

Dockerfile-slim → Dockerfile → Dockerfile-pandoc → Dockerfile-full

It means that if you update foliant/foliant:slim, you should update all its dependants after: foliant/foliant then foliant/foliant:pandoc then foliant/foliant:full. If you want to update foliant/foliant, you should update foliant/foliant:pandoc then foliant/foliant:full etc.

Which image to update?

  • When Foliant-core updates:

    update foliant/foliant:slimfoliant/foliantfoliant/foliant:pandocfoliant/foliant:full

  • When foliantcontrib.init updates:

    update foliant/foliantfoliant/foliant:pandocfoliant/foliant:full

  • When foliantcontrib.pandoc updates:

    update foliant/foliant:pandocfoliant/foliant:full

  • When any other Foliant extension updates:

    update foliant/foliant:full and requirements.txt from dependency_files/python_packages/requirements.txt

Update procedure

To update Docker-image on Github Container registry, you should:

  1. Clone, pull or download this repo on your computer.
  2. Update dependencies if needed.
  3. Push changes to this repo.
  4. Run a script which related to Docker-image you needed:
# In the project directory

./build_slim.sh    # for foliant/foliant:slim
./build_latest.sh  # for foliant/foliant
./build_pandoc.sh  # for foliant/foliant:pandoc
./build_full.sh    # for foliant/foliant:full

How to tag image (optional)

Scripts set tag for published image automatically. But you can tag the image manually as a script parameter:

./build_full.sh 1.0.13

Docker Hub authorization

To push images to the Foliant Github Container registry, you need a personal access token with appropriate rights.