Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleplus committed Mar 18, 2024
2 parents 3b61aca + 3eac230 commit de1a07c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 33 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ To know more command-line options of `latexmk`:
docker run --rm --net=none leplusorg/latex latexmk -h
```

## texlive vs texlive-full

Version 1 of this image was using the
[texlive-full](https://packages.debian.org/search?keywords=texlive-full&searchon=names&exact=1&suite=all&section=all)
debian package to include as much TeX Live packages pre-installed as
possible. But the resulting docker image was over 4 GB making it slow
to download and breaking some CI/CD disk limits (including the free
tier of GitHub Actions that I use). To keep the image usable by as many
people as possible, I decided with version 2 and above to switch
to the default
[texlive](https://packages.debian.org/search?keywords=texlive&searchon=names&exact=1&suite=all&section=all)
package.

If you need more TeX Live packages, you have the following options:
- use version 1 of this docker image (i.e. leplusorg/latex:1).
- use the image this fork is based on (i.e. aergus/latex).

## Request new tool

Please use [this link](https://github.com/leplusorg/docker-latex/issues/new?assignees=thomasleplus&labels=enhancement&template=feature_request.md&title=%5BFEAT%5D) (GitHub account required) to request that a new tool be added to the image. I am always interested in adding new capabilities to these images.
39 changes: 6 additions & 33 deletions latex/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,9 @@ ARG USER_HOME=/home/latex
ARG USER_ID=1000
ARG USER_GECOS=LaTeX

ARG WGET=wget
ARG GIT=git
ARG SSH=openssh-client
ARG MAKE=make
ARG PANDOC=pandoc
ARG PYGMENTS=python3-pygments
ARG PYTHONIS=python-is-python3
ARG FIG2DEV=fig2dev
ARG JRE=default-jre-headless

# hadolint ignore=DL3008
RUN apt-get update && apt-get install --no-install-recommends -y \
texlive-full \
# some auxiliary tools
"$WGET" \
"$GIT" \
"$SSH" \
"$MAKE" \
# markup format conversion tool
"$PANDOC" \
# XFig utilities
"$FIG2DEV" \
# syntax highlighting package
"$PYGMENTS" \
# temporary fix for minted, see https://github.com/gpoore/minted/issues/277
"$PYTHONIS" \
# Java runtime environment (e.g. for arara)
"$JRE" \
# will be used to add a user
adduser && \
RUN apt-get update && \
apt-get install --no-install-recommends -y adduser chktex ghostscript lacheck latexmk texlive texlive-latex-extra && \
# Removing documentation packages *after* installing them is kind of hacky,
# but it only adds some overhead while building the image.
apt-get --purge remove -y .\*-doc$ && \
Expand All @@ -43,8 +16,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
rm -rf /var/lib/apt/lists/*

RUN adduser \
--home "$USER_HOME" \
--uid $USER_ID \
--gecos "$USER_GECOS" \
--home "${USER_HOME}" \
--uid "${USER_ID}" \
--gecos "${USER_GECOS}" \
--disabled-password \
"$USER_NAME"
"${USER_NAME}"

0 comments on commit de1a07c

Please sign in to comment.