liantze / AltaCV

Yet another alternative curriculum vitae/rΓ©sumΓ© class with LaTeX
Other
1.27k stars 331 forks source link

Add docker-image and docker-compose to quickly generate PDFs locally #63

Closed marcellodesales closed 3 years ago

marcellodesales commented 3 years ago

Dockerized solution

Documentation

Building Docker image liantze/altacv

ATTENTION: one option is to have the docker image pushed to the Docker Registry so that users don't need to build it locally.

Running

Samples were moved to isolated dir for simplication of the examples.

Each Docker-compose has the following switches as env vars:

Option Description Required
TEX_FILENAME=main Name of the tex file. Say "main.tex". Running latexpdf might generate main.aux (if references are included set WITH_BIB=true) Yes
WITH_BIB=true If you have Bib references, just say so. No
CLEAN_LATEX_LOGS=true Clean the logs generated No
RENAME_PDF_AS=my-resume Rename the final PDF with the name. Say "main.pdf -> RENAME_PDF_AS.pdf No
$ docker-compose up
Recreating mmayer_altacv_1 ... done
Attaching to mmayer_altacv_1
altacv_1  | 🐳 AltaCV: Setting up by placing /altacv/altacv.cls into /resume
altacv_1  | 🐳 AltaCV: Loaded files:
altacv_1  | 🐳 AltaCV: Starting pdf generation
altacv_1  | /entrypoint.sh: line 1: !#/usr/bin/bash: No such file or directory
altacv_1  |
altacv_1  | 🐳 AltaCV: Executing pdflatex 'mmayer.tex'
altacv_1  | This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=pdflatex)
altacv_1  |  restricted \write18 enabled.
altacv_1  | entering extended mode
altacv_1  | (./mmayer.tex
altacv_1  | LaTeX2e <2020-02-02> patch level 5
altacv_1  | L3 programming layer <2020-06-18> (./altacv.cls
altacv_1  | Document Class: altacv 2020/05/17 AltaCV v1.3.2, yet another alternative class
altacv_1  | for a resume/curriculum vitae.
altacv_1  | (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
...
...
altacv_1  | /Lato-Italic.pfb></usr/share/texlive/texmf-dist/fonts/type1/typoland/lato/Lato-
altacv_1  | Regular.pfb>
altacv_1  | Output written on mmayer.pdf (2 pages, 203299 bytes).
altacv_1  | Transcript written on mmayer.log.
altacv_1  |
altacv_1  | Done.
altacv_1  |
altacv_1  | 🐳 AltaCV: Cleaning logs since env var 'CLEAN_LATEX_LOGS' is set.
altacv_1  |
altacv_1  | 🐳 AltaCV: Renaming PDF from mmayer.pdf as mmayer-resume.pdf
altacv_1  | 🐳 AltaCV: Cleaning AltaCV
mmayer_altacv_1 exited with code 0

 ☸️  kubectl@1.18.6 πŸ“› kustomize@v3.8.1    πŸ™ docker-compose@1.27.2
⎈ default πŸ” docker-desktop
~/dev/github.com/marcellodesales/AltaCV/mmayer on ξ‚  feature/altar-docker-image-refactoring! ⌚ 0:11:21
$ ls -la
total 776
drwxr-xr-x   8 marcellodesales  staff     256 Oct  6 00:11 .
drwxr-xr-x  19 marcellodesales  staff     608 Oct  6 00:07 ..
-rw-r--r--   1 marcellodesales  staff     536 Oct  6 00:07 docker-compose.yaml
-rw-r--r--   1 marcellodesales  staff  203299 Oct  6 00:11 mmayer-resume.pdf
-rw-r--r--   1 marcellodesales  staff   24666 Oct  6 00:07 mmayer-wikipedia-cc-by-2_0.jpg
-rw-r--r--   1 marcellodesales  staff   81647 Oct  6 00:07 mmayer.png
-rw-r--r--   1 marcellodesales  staff    9053 Oct  6 00:07 mmayer.tex
-rw-r--r--   1 marcellodesales  staff    1341 Oct  6 00:07 sample.bib

The generated PDF will be available in the current-dir.

mmayer-resume.pdf

liantze commented 3 years ago

Hello @marcellodesales, thanks for the contributions and discussions! Personally I would prefer this repo (i.e. my own) to contain LaTeX-only sources. I would strongly encourage that you host/fork these at your own repo.