Docker is a project that helps develop, update and publish Docker images for Foliant.
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.
-
foliant/foliant:slim
— minimal image of Foliant core with no extensions. -
foliant/foliant
— the default image with Foliant core and the foliantcontrib.init extension -
foliant/foliant:pandoc
— the image with foliantcontrib.pandoc and its dependencies: TexLive and Pandoc for building PDF and DOCX -
foliant/foliant:full
— the full image with all official Foliant extensions and third-party tools required for them to work -
Makefile needed to build Docker images on local computer
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.
-
When Foliant-core updates:
update
foliant/foliant:slim
→foliant/foliant
→foliant/foliant:pandoc
→foliant/foliant:full
-
When foliantcontrib.init updates:
update
foliant/foliant
→foliant/foliant:pandoc
→foliant/foliant:full
-
When foliantcontrib.pandoc updates:
update
foliant/foliant:pandoc
→foliant/foliant:full
-
When any other Foliant extension updates:
update
foliant/foliant:full
and requirements.txt fromdependency_files/python_packages/requirements.txt
To update Docker-image on Github Container registry, you should:
- Clone, pull or download this repo on your computer.
- Update dependencies if needed.
- Push changes to this repo.
- 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
Scripts set tag for published image automatically. But you can tag the image manually as a script parameter:
./build_full.sh 1.0.13
To push images to the Foliant Github Container registry, you need a personal access token with appropriate rights.