Skip to content

123marvin123/typst-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Typst Docker Image

This is a (unofficial) Docker Image for a bare-bones distribution of Typst. It is based on Debian and only contains a pre-compiled version of the Typst-CLI.

❗️Please note: There are no additional fonts installed. Take a look at the section "Using Installed Host System Fonts" or use the built-in fonts in the pre-compiled binary.

⚒️ Running the image

docker run --name typst -v $(PWD):/root  -it 123marvin123/typst

In the docker environment, you can use the typst command like usual. E.g. typst compile thesis.typ.

Please note that we will not provide a latest tag until Typst has arrived at a stable state without major breaking changes with each release.

🈂️ Using Installed Host System Fonts

The base image of Debian does not contain any additional fonts. This means, you can either use the few built-in fonts that are embedded in the Typst executable, or mount your system's font directory into the docker container. This can be accomplished in two ways:

Mount system fonts to /usr/share/fonts

E.g. on macOS:

docker run --name typst -it -v /System/Library/Fonts:/usr/share/fonts:ro 123marvin123/typst

This will allow Typst to see the read-only mounted fonts from your host system without having to modify anything.

Mount system fonts to anywhere

Instead of mounting to /usr/share/fonts, you can mount the folder to anywhere (e.g. /root/fonts) and then modify the environment variable TYPST_FONT_PATHS. Using this technique, you can also mount more than one folder:

E.g. on macOS:

docker run --name typst -it -v /System/Library/Fonts:/root/fonts:ro --env TYPST_FONT_PATHS=/root/fonts 123marvin123/typst

This only has to be done once you create the container.

About

Docker Image for a bare-bones Typst distribution.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •