Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/123marvin123/typst-docker
Docker Image for a bare-bones Typst distribution.
https://github.com/123marvin123/typst-docker
Last synced: 23 days ago
JSON representation
Docker Image for a bare-bones Typst distribution.
- Host: GitHub
- URL: https://github.com/123marvin123/typst-docker
- Owner: 123marvin123
- License: apache-2.0
- Created: 2023-05-01T11:31:18.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-18T11:29:42.000Z (6 months ago)
- Last Synced: 2024-05-18T12:32:04.258Z (6 months ago)
- Language: Dockerfile
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Typst Docker Image
This is a (unofficial) Docker Image for a bare-bones distribution of [Typst](https://github.com/typst/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
```bash
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:
```bash
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:
```bash
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.