Skip to content

Repository files navigation

compose-typst

Introduction

This project provides several Docker Compose services for Typst workflows.

The services support the following Typst-related tasks:

  • inspecting available fonts
  • checking Typst installation information
  • managing persistent cache data

Docker Compose permits this without installing Typst directly on your local machine.

Variables

The utility services require the following environment variables:

  • UID - The Unix User ID. This can be obtained by running id -u
  • GID - The Unix User Group ID. This can be obtained by running id -g

In the following examples, the UID and GID values are stored in an .env file passed to Docker Compose using the --env-file argument.

Services

Description: A base service defining the core Typst image. This service isn't intended to be invoked directly, but rather extended and reused by other services (inheritance).


Description: Lists the fonts available to the Typst image using the mounted font cache volume.

The typst-fonts service can be started with fonts.sh.

Example:

docker compose \
    --env-file .env \
    -f compose-typst/docker-compose.yml \
    run --rm \
    typst-fonts

Description: Prints Typst installation and environment information.

The typst-info service can be started with info.sh.

Example:

docker compose \
    --env-file .env \
    -f compose-typst/docker-compose.yml \
    run --rm \
    typst-info

Description: An interactive Alpine container mounting both the local project directory and the persistent Typst volumes.

  • The local directory is mounted in /data.
  • The typst-packages volume is mounted in /mnt/typst-packages.

The alpine-volume service can be started with volume.sh.

Example:

docker compose \
    --env-file .env \
    -f compose-typst/docker-compose.yml \
    run --rm \
    alpine-volume

Volumes

Description: Persistent storage for Typst package cache data.

Access this volume by running the alpine-volume service.

About

Docker Compose Shared Service for Typst

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages