commit 1560651d98700a19715ce7c5173c3eb074a8c247 Author: Nico Verbruggen Date: Sat Mar 14 11:29:10 2026 +0100 Initial version diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b31a8dd --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,21 @@ +name: Publish image +on: + push: + branches: [main] + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + push: true + tags: ghcr.io/${{ github.repository }}:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c3bd030 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM python:3.12-slim + +RUN apt-get update && apt-get install -y --no-install-recommends \ + fontforge ttfautohint \ + && rm -rf /var/lib/apt/lists/* + +RUN pip install --no-cache-dir fonttools + +WORKDIR /build diff --git a/README.md b/README.md new file mode 100644 index 0000000..c6fef37 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# fntbld-oci + +A container image with font-building tools pre-installed: + +- **FontForge** — scriptable font editor +- **ttfautohint** — auto-hinter for TrueType fonts +- **fontTools** — Python library for manipulating font files + +The image contains no project-specific files. Mount or clone your font project into `/build` at runtime. + +## Build locally + +```bash +podman build -t fntbld-oci . +``` + +## Pull from GitHub Container Registry + +```bash +podman pull ghcr.io/nicoverbruggen/fntbld-oci:latest +``` + +## Usage + +From your font project directory: + +```bash +podman run --rm -v .:/build ghcr.io/nicoverbruggen/fntbld-oci python3 build.py +``` + +## Debugging + +To rebuild and get a shell inside the container: + +```bash +podman build -t fntbld-oci . && podman run --rm -it fntbld-oci sh +```