Skip to content

Commit

Permalink
add ref to get fonts and more detailed arg info
Browse files Browse the repository at this point in the history
  • Loading branch information
nickv2002 committed Feb 21, 2024
1 parent 99b2d49 commit 6018176
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,18 @@ Once you have the `dominiontabs` container you can run it from your CLI and pass

<!--TODO update this doc to pull pre-built images from GitHub once those are set up-->

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`

Expand Down
3 changes: 3 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 6018176

Please sign in to comment.