From 601817684dd7b5f9d3c3f4772eeed99868539942 Mon Sep 17 00:00:00 2001 From: Nick Vance Date: Tue, 20 Feb 2024 16:51:22 -0800 Subject: [PATCH] add ref to get fonts and more detailed arg info --- README.md | 9 +++++---- dockerfile | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 55e95400..f1d5c020 100644 --- a/README.md +++ b/README.md @@ -58,17 +58,18 @@ Once you have the `dominiontabs` container you can run it from your CLI and pass -Which will, by default, dump the output of the help text of the CLI tool. But we're going to want to add in some extra args 99% of the time. +Which will, by default, dump the output of the help text of the CLI tool. But we're going to want to add in some extra args 99% of the time. 1. Bind mount to an output directory (`-v`) and tell the script to output there so that we get a PDF in the local filesystem when things are done (`--outfile ./output/foo.pdf`). -2. Add the `--rm` argo to tell docker not to save a container each time it runs. -3. Add a few CLI args to reduce the runtime and file size (`--expansions cornucopia`). +1. Add the `--rm` argo to tell docker not to save a container each time it runs. +1. Point to the fonts built in to the image with `--font-dir /fonts` +1. Add a few CLI args to reduce the runtime and file size (`--expansions cornucopia`). So now we have `docker run --rm -v $PWD/output:/app/output dominiontabs --expansions cornucopia --outfile ./output/dominion_dividers_docker.pdf` -Once that runs you should have under your current directory: +Once that runs you should have under your current directory: `./output/dominion_dividers_docker.pdf` diff --git a/dockerfile b/dockerfile index 2156f276..cb45d787 100644 --- a/dockerfile +++ b/dockerfile @@ -1,5 +1,8 @@ FROM python:3.9-slim AS compile-image +# get fonts +COPY --from=pacodrokad/fonts /fonts /fonts + # Add git for hooks RUN apt-get update && apt-get install -y --no-install-recommends git