{"id":17932292,"url":"https://github.com/kjarosh/latex-docker","last_synced_at":"2025-03-24T05:32:25.016Z","repository":{"id":89975367,"uuid":"346507846","full_name":"kjarosh/latex-docker","owner":"kjarosh","description":"A set of lightweight Docker images for building LaTeX documents","archived":false,"fork":false,"pushed_at":"2025-02-14T23:16:51.000Z","size":61,"stargazers_count":51,"open_issues_count":4,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T02:22:54.009Z","etag":null,"topics":["docker","docker-container","dockerfile","latex","texlive"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kjarosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-10T22:20:37.000Z","updated_at":"2025-03-05T14:56:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"d72612f9-e1e0-4498-92fb-ef546f93d3c7","html_url":"https://github.com/kjarosh/latex-docker","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjarosh%2Flatex-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjarosh%2Flatex-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjarosh%2Flatex-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjarosh%2Flatex-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kjarosh","download_url":"https://codeload.github.com/kjarosh/latex-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217123,"owners_count":20579288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-container","dockerfile","latex","texlive"],"created_at":"2024-10-28T21:26:14.303Z","updated_at":"2025-03-24T05:32:24.757Z","avatar_url":"https://github.com/kjarosh.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LaTeX in Docker\n\n[![GitHub license](https://img.shields.io/github/license/kjarosh/latex-docker)](https://github.com/kjarosh/latex-docker/blob/main/LICENSE)\n[![GitHub build status](https://img.shields.io/github/actions/workflow/status/kjarosh/latex-docker/docker.yaml?branch=main)](https://github.com/kjarosh/latex-docker/actions)\n[![GitHub release](https://img.shields.io/github/v/release/kjarosh/latex-docker)](https://github.com/kjarosh/latex-docker/releases)\n[![DockerHub](https://img.shields.io/badge/docker.io-kjarosh%2Flatex-blue)](https://hub.docker.com/r/kjarosh/latex)\n[![GitHub Container Registry](https://img.shields.io/badge/ghcr.io-kjarosh%2Flatex-blue)](https://github.com/users/kjarosh/packages/container/package/latex)\n\n[![Docker Image Size (minimal)](https://img.shields.io/docker/image-size/kjarosh/latex/latest-minimal?label=minimal)](https://hub.docker.com/r/kjarosh/latex)\n[![Docker Image Size (basic)](https://img.shields.io/docker/image-size/kjarosh/latex/latest-basic?label=basic)](https://hub.docker.com/r/kjarosh/latex)\n[![Docker Image Size (small)](https://img.shields.io/docker/image-size/kjarosh/latex/latest-small?label=small)](https://hub.docker.com/r/kjarosh/latex)\n[![Docker Image Size (medium)](https://img.shields.io/docker/image-size/kjarosh/latex/latest-medium?label=medium)](https://hub.docker.com/r/kjarosh/latex)\n[![Docker Image Size (full)](https://img.shields.io/docker/image-size/kjarosh/latex/latest-full?label=full)](https://hub.docker.com/r/kjarosh/latex)\n\nThis repository defines a set of images which may be used\nto run LaTeX in a container, for example in CI/CD.\nThey come in several flavors, which correspond to TeX Live schemes\n(see the table below).\nThe default scheme is `full` which contains all packages.\n\nIf some package is missing you can always use `tlmgr` to install it.\nThe image is based on [`alpine`](https://alpinelinux.org/), so system packages\nmay be installed using `apk`.\n\n| Scheme  | Image                          | Size    |\n|---------|--------------------------------|---------|\n| minimal | `kjarosh/latex:2024.4-minimal` | ~40 MB  |\n| basic   | `kjarosh/latex:2024.4-basic`   | ~90 MB  |\n| small   | `kjarosh/latex:2024.4-small`   | ~180 MB |\n| medium  | `kjarosh/latex:2024.4-medium`  | ~500 MB |\n| full    | `kjarosh/latex:2024.4`         | ~2 GB   |\n\nThe images are made in such a way that they reuse layers.\nFor example `full` will add a layer to `medium` with packages that are\nnot present there.\nThis makes it easier to manage and saves space.\n\n## Usage\n\nIf you're writing a CI/CD configuration, check out [CI/CD Examples](#cicd-examples)!\n\nAssuming you want to quickly compile a file named `main.tex` in the current\ndirectory to a PDF and place the output in `./out`:\n\n```shell\ndocker run --rm -v \"$PWD:/src\" -w /src -u \"$UID:$GID\" kjarosh/latex:2024.4 latexmk -pdf -outdir=out -auxdir=out/aux main.tex\n```\n\nIf you want to work on your LaTeX project and see your changes live,\nadd `-pvc` at the end.\nThis will recompile the project automatically each time a source file changes.\n\nIf you want to use a different engine, use e.g. `-xelatex` for XeLaTeX\nor `-lualatex` for LuaLaTeX.\n\nOther useful options you may want to check out include e.g. `-c`, `-g`, or `-silent`.\n\nSee [latexmk documentation](https://ctan.gust.org.pl/tex-archive/support/latexmk/latexmk.pdf)\nfor detailed usage and options.\n\nIf you don't want to use `latexmk` you are free to issue any command you want\n(`latex`, `pdflatex`, `xelatex`, etc.) and it should just work.\nFor more complex building processes, using a building tool such as `make` is advised.\nIn that case you'll need to install it by issuing `apk add make` inside the container.\n\n## Versions\n\nThere are several types of versions described below.\n\n*If you're unsure which version to use, use the latest stable version.*\n\n### Stable Versions\n\nStable versions are in the format of `\u003cmajor\u003e.\u003cminor\u003e` (e.g. `2022.1`).\nThe major version relates to TeX Live version (which is the year),\nthe minor version is the version of the image within the given year.\n\nStable versions offer image updates \u0026 fixes and include the\nset of packages for the given TeX Live version at the time of release.\n\n| TeX Live version | Latest stable version |\n| ---------------- | --------------------- |\n| 2024             | `2024.4`              |\n| 2023             | `2023.4`              |\n| 2022             | `2022.3`              |\n| 2021             | `2021.4`              |\n| 2020             | `2020.2`              |\n| 2019             | `2019.2`              |\n| 2018             | `2018.2`              |\n\nAll stable versions are available on the [releases page](https://github.com/kjarosh/latex-docker/releases).\n\n### Development Versions\n\nIf you want to use the newest TeX Live or visit an old release\nfrom the past, you can use development versions.\n\nDevelopment versions are released automatically\nevery day and come in several formats:\n\n1. `devel` \u0026mdash; The lastest development build which uses the main TL mirror.\n  Using this version is **highly discouraged**, especially in CI/CD,\n  as in case a newer TeX Live release appears, `tlmgr` will not work.\n\n2. `devel-\u003cTL_VERSION\u003e-\u003cDATE\u003e` \u0026mdash; A development version containing TeX Live\n  in version `\u003cTL_VERSION\u003e`, based on a historic mirror from `\u003cDATE\u003e` (so that `tlmgr` will work).\n  Usually these images are created once and not updated in the future.\n\n3. `devel-\u003cTL_VERSION\u003e` \u0026mdash; The newest development build for the given TeX Live release.\n  When `\u003cTL_VERSION\u003e` is the current TeX Live version, this image will\n  usually be newer than the latest stable release of `\u003cTL_VERSION\u003e`.\n  However, when `\u003cTL_VERSION\u003e` is not the current TeX Live version, the latest\n  stable release usually will contain maintenance fixes and base image updates.\n\n4. `devel-any-\u003cDATE\u003e` \u0026mdash; A development version containing TeX Live from `\u003cDATE\u003e`.\n  This is the same as `devel-\u003cTL_VERSION\u003e-\u003cDATE\u003e`, but without `\u003cTL_VERSION\u003e` in case\n  someone wants to use the TeX Live from `\u003cDATE\u003e` without knowing `\u003cTL_VERSION\u003e`.\n\n## CI/CD Examples\n\n### GitHub Actions\n\nExample using `latexmk`:\n\n```yaml\nname: Compile LaTeX\non: [ push ]\njobs:\n  container:\n    runs-on: ubuntu-latest\n    container: kjarosh/latex:2024.4\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Build using latexmk\n        run: latexmk -pdf -output-directory=out main.tex\n\n      - name: Upload document\n        uses: actions/upload-artifact@v4\n        with:\n          name: main-document\n          path: out/index.pdf\n```\n\n### GitLab CI/CD\n\nExample using `latexmk`:\n\n```yaml\nbuild:\n  stage: build\n  image: kjarosh/latex:2024.4\n  script:\n    - latexmk -pdf -output-directory=out main.tex\n  artifacts:\n    paths:\n      - out/index.pdf\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjarosh%2Flatex-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkjarosh%2Flatex-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjarosh%2Flatex-docker/lists"}