Skip to content

Commit

Permalink
feat: Update Dockerfile to use ubuntu:mantic & move sintaxis (#3)
Browse files Browse the repository at this point in the history
* Update Dockerfile for LaTeX-full image

* Update LaTeX-min Dockerfile to use Ubuntu mantic as base image

* Update Dockerfile to install perl-modules

* Update Dockerfile to include wget for texlive installation

* Update wget command to include --no-check-certificate flag

* Update Dockerfile to install perl-modules

* Add libencode-locale-perl package to Dockerfile

* Add libencode-locale-perl package to Dockerfile

* Update Dockerfile to include TARGETARCH in PATH

* Update Dockerfile to include architecture-specific paths in PATH variable

* Add PATH to Dockerfile

* Add environment variable and check target architecture

* Update TEXLIVE_BINDIR environment variable in Dockerfile

* Update Dockerfile for TexLive installation

* Update TEXDIR and PATH in Dockerfile

* Update LaTeX Dockerfile to set PATH environment variable

* Add debugging information to Dockerfile

* Fix missing dependency in Dockerfile

* Update LaTeX packages and fix tlmgr path

* Add PERL5LIB environment variable to Dockerfile

* Update LaTeX dependencies and fix PATH in Dockerfile

* Update Dockerfile to remove PERL5LIB environment variable

* Update Dockerfile to set PATH for Texlive

* Update TEXDIR and PATH in Dockerfile

* Update Dockerfile to include missing Perl package and add TEXLIVE_VERSION to PATH

* Update TEXDIR and PATH environment variables

* Update TEXDIR and PATH in Dockerfile

* Add TEXLIVE_VERSION to PATH in Dockerfile

* Update TEXDIR and PATH in Dockerfile

* Add chktex-builder and update Dockerfile

* fix? Update Dockerfile for LaTeX image

* Fix Dockerfile to remove unnecessary package installation

* do not harcode the checksum

* Add TEXLIVE_VERSION to PATH in Dockerfile before tlmgr

* Update Dockerfile to remove unnecessary PATH modification

* Update TEXDIR in Dockerfile
  • Loading branch information
totallynotdavid authored Mar 12, 2024
1 parent 1b2aae1 commit 9df163a
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 74 deletions.
68 changes: 32 additions & 36 deletions latex/full/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
# syntax=docker/dockerfile:1.5

FROM --platform=${TARGETARCH} docker.io/library/buildpack-deps:kinetic-scm as chktex-builder
ARG VARIANT="kinetic"
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
FROM ubuntu:mantic as chktex-builder
ARG CHKTEX_VERSION=1.7.6
ARG CHKTEX_MIRROR="http://download.savannah.gnu.org/releases/chktex"

WORKDIR /tmp/chktex-builder
ENV DEBIANT_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt update -y && \
apt install -y --no-install-recommends g++ make

RUN curl -fL -o- ${CHKTEX_MIRROR}/chktex-${CHKTEX_VERSION}.tar.gz | tar xz --strip-components 1

RUN ./configure && \
RUN apt-get update && \
apt-get install -y --no-install-recommends g++ make curl && \
curl -fL -o- ${CHKTEX_MIRROR}/chktex-${CHKTEX_VERSION}.tar.gz | tar xz --strip-components=1 && \
./configure && \
make

FROM --platform=${TARGETPLATFORM} docker.io/library/buildpack-deps:kinetic-scm
ARG VARIANT="kinetic"
FROM ubuntu:mantic
ARG VARIANT="mantic"
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH

LABEL org.opencontainers.image.title "LaTeX-full"
LABEL org.opencontainers.image.authors "David Duran <contacto@altmails.com>"
LABEL org.opencontainers.image.url "https://github.com/caefisica/devcontainers/"
LABEL org.opencontainers.image.documentation "https://github.com/caefisica/devcontainers/blob/master/latex/README.md"
LABEL org.opencontainers.image.source "https://github.com/caefisica/devcontainers/tree/master/latex"
LABEL org.opencontainers.image.description "Un entorno completo de desarrollo de LaTeX. Perfecto para utilizar plantillas sin tener que instalar paquetes adicionales."
LABEL org.opencontainers.image.title="LaTeX-full" \
org.opencontainers.image.authors="David Duran <contacto@altmails.com>" \
org.opencontainers.image.url="https://github.com/caefisica/devcontainers/" \
org.opencontainers.image.documentation="https://github.com/caefisica/devcontainers/blob/master/latex/README.md" \
org.opencontainers.image.source="https://github.com/caefisica/devcontainers/tree/master/latex" \
org.opencontainers.image.description="Un entorno completo de desarrollo de LaTeX. Perfecto para utilizar plantillas sin tener que instalar paquetes adicionales."

ARG SCHEME="scheme-full"
ARG DOCFILES=0
Expand All @@ -39,19 +33,19 @@ ARG TEXLIVE_VERSION=2023
ARG TEXLIVE_MIRROR="https://mirror.ctan.org/systems/texlive/tlnet"
ARG DEBIAN_FRONTEND="noninteractive"

ENV LANG="es_ES.UTF-8"
ENV LANGUAGE="es_ES:es"
ENV TERM="xterm"
ENV TEXDIR="/usr/local/texlive"
ENV TEXUSERDIR="/texlive-user"
ENV PATH ${TEXDIR}/bin/aarch64-linux:${TEXDIR}/bin/x86_64-linux:${PATH}
ENV LANG="es_ES.UTF-8" \
LANGUAGE="es_ES:es" \
TERM="xterm" \
TEXDIR="/usr/local/texlive/${TEXLIVE_VERSION}" \
TEXUSERDIR="/texlive-user" \
PATH="${PATH}"

RUN apt update -y && \
apt install -y --no-install-recommends fontconfig vim neovim python3-pygments ttf-mscorefonts-installer ghostscript locales && \
RUN apt-get update && \
apt-get install -y --no-install-recommends fontconfig vim neovim python3-pygments ttf-mscorefonts-installer ghostscript locales perl perl-modules libencode-locale-perl && \
locale-gen ${LANG} && \
update-locale LANG=${LANG} && \
apt clean autoclean && \
apt autoremove -y && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

WORKDIR /tmp/texlive
Expand All @@ -67,26 +61,28 @@ tlpdbopt_install_docfiles ${DOCFILES}
tlpdbopt_install_srcfiles ${SRCFILES}
EOF

RUN wget -qO- "${TEXLIVE_MIRROR}/install-tl-unx.tar.gz" | tar xz --strip-components=1 && \
RUN wget --no-check-certificate -qO- "${TEXLIVE_MIRROR}/install-tl-unx.tar.gz" | tar xz --strip-components=1 && \
export TEXLIVE_INSTALL_NO_CONTEXT_CACHE=1 && \
export TEXLIVE_INSTALL_NO_WELCOME=1 && \
./install-tl -profile /tmp/texlive/profile.txt -no-interaction -texdir ${TEXDIR} -texuserdir ${TEXUSERDIR} && \
rm -rf /tmp/texlive ${TEXDIR}/*.log

# Install `latexindent` dependencies
RUN apt update -y && \
apt install -y --no-install-recommends cpanminus make gcc libc6-dev && \
RUN apt-get update && \
apt-get install -y --no-install-recommends cpanminus make gcc libc6-dev && \
cpanm -n -q Log::Log4perl && \
cpanm -n -q XString && \
cpanm -n -q Log::Dispatch::File && \
cpanm -n -q YAML::Tiny && \
cpanm -n -q File::HomeDir && \
cpanm -n -q Unicode::GCString && \
apt remove -y cpanminus make gcc libc6-dev && \
apt clean autoclean && \
apt autoremove -y && \
apt-get remove -y cpanminus make gcc libc6-dev && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/{apt,dpkg,cache,log}/

ENV PATH="/usr/local/texlive/${TEXLIVE_VERSION}/bin/x86_64-linux:${PATH}"

RUN tlmgr update --self --all && \
tlmgr update --all && \
texhash
Expand Down
79 changes: 41 additions & 38 deletions latex/min/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,56 +1,59 @@
# syntax=docker/dockerfile:1.5

FROM --platform=${TARGETARCH} docker.io/library/buildpack-deps:kinetic-scm as chktex-builder
ARG VARIANT="kinetic"
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
FROM ubuntu:mantic as chktex-builder
ARG CHKTEX_VERSION=1.7.6
ARG CHKTEX_MIRROR="http://download.savannah.gnu.org/releases/chktex"

WORKDIR /tmp/chktex-builder
ENV DEBIANT_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt update -y && \
apt install -y --no-install-recommends g++ make && \
curl -fL -o- ${CHKTEX_MIRROR}/chktex-${CHKTEX_VERSION}.tar.gz | tar xz --strip-components 1 && \
RUN apt-get update && \
apt-get install -y --no-install-recommends g++ make curl wget && \
curl -fL -o- ${CHKTEX_MIRROR}/chktex-${CHKTEX_VERSION}.tar.gz | tar xz --strip-components=1 && \
./configure && \
make

FROM --platform=${TARGETPLATFORM} docker.io/library/buildpack-deps:kinetic-scm
ARG VARIANT="kinetic"
FROM ubuntu:mantic
ARG VARIANT="mantic"
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH

LABEL org.opencontainers.image.title "LaTeX-min"
LABEL org.opencontainers.image.authors "David Duran <contacto@altmails.com>"
LABEL org.opencontainers.image.url "https://github.com/caefisica/devcontainers/"
LABEL org.opencontainers.image.documentation "https://github.com/caefisica/devcontainers/blob/master/latex/README.md"
LABEL org.opencontainers.image.source "https://github.com/caefisica/devcontainers/tree/master/latex"
LABEL org.opencontainers.image.description "Un entorno mínimo de desarrollo de LaTeX. Ideal para usuarios avanzados que deseen una configuración liviana y rápida. Perfecto si ya sabes cómo agregar paquetes según lo necesites."
LABEL org.opencontainers.image.title="LaTeX-min" \
org.opencontainers.image.authors="David Duran <contacto@altmails.com>" \
org.opencontainers.image.url="https://github.com/caefisica/devcontainers/" \
org.opencontainers.image.documentation="https://github.com/caefisica/devcontainers/blob/master/latex/README.md" \
org.opencontainers.image.source="https://github.com/caefisica/devcontainers/tree/master/latex" \
org.opencontainers.image.description="Un entorno mínimo de desarrollo de LaTeX. Ideal para usuarios avanzados que deseen una configuración liviana y rápida. Perfecto si ya sabes cómo agregar paquetes según lo necesites."

ARG SCHEME="scheme-basic"
ARG DOCFILES=0
ARG SRCFILES=0
ARG TEXLIVE_VERSION=2023
ARG TEXLIVE_MIRROR="https://mirror.ctan.org/systems/texlive/tlnet"
ENV DEBIAN_FRONTEND="noninteractive"
ENV LANG="es_ES.UTF-8"
ENV LANGUAGE="es_ES.UTF-8"
ENV TERM="xterm"
ENV TEXDIR="/usr/local/texlive"
ENV TEXUSERDIR="/texlive-user"
ENV PATH ${TEXDIR}/bin/aarch64-linux:${TEXDIR}/bin/x86_64-linux:${PATH}

RUN apt update -y && \
apt install -y --no-install-recommends \
fontconfig vim neovim python3-pygments ttf-mscorefonts-installer texlive-lang-spanish ghostscript locales && \
ARG DEBIAN_FRONTEND="noninteractive"

ENV LANG="es_ES.UTF-8" \
LANGUAGE="es_ES.UTF-8" \
TERM="xterm" \
TEXDIR="/usr/local/texlive/${TEXLIVE_VERSION}" \
TEXUSERDIR="/texlive-user" \
PATH="${PATH}"

RUN apt-get update && \
apt-get install -y --no-install-recommends fontconfig vim neovim python3-pygments ttf-mscorefonts-installer ghostscript locales perl perl-modules libencode-locale-perl && \
locale-gen ${LANG} && \
update-locale LANG=${LANG} && \
rm -rf /var/lib/apt/lists/*

WORKDIR /tmp/texlive

RUN wget --no-check-certificate "${TEXLIVE_MIRROR}/install-tl-unx.tar.gz" && \
wget --no-check-certificate "${TEXLIVE_MIRROR}/install-tl-unx.tar.gz.sha512" && \
sha512sum -c install-tl-unx.tar.gz.sha512 && \
tar xzf install-tl-unx.tar.gz --strip-components=1 && \
rm install-tl-unx.tar.gz install-tl-unx.tar.gz.sha512

COPY <<EOF /tmp/texlive/profile.txt
selected_scheme ${SCHEME}
instopt_letter 1
Expand All @@ -62,21 +65,21 @@ tlpdbopt_install_docfiles ${DOCFILES}
tlpdbopt_install_srcfiles ${SRCFILES}
EOF

RUN wget -qO- "${TEXLIVE_MIRROR}/install-tl-unx.tar.gz" | tar xz --strip-components=1 && \
export TEXLIVE_INSTALL_NO_CONTEXT_CACHE=1 && \
RUN export TEXLIVE_INSTALL_NO_CONTEXT_CACHE=1 && \
export TEXLIVE_INSTALL_NO_WELCOME=1 && \
./install-tl -profile /tmp/texlive/profile.txt \
-no-interaction -texdir ${TEXDIR} -texuserdir ${TEXUSERDIR} && \
./install-tl -profile /tmp/texlive/profile.txt -no-interaction -texdir ${TEXDIR} -texuserdir ${TEXUSERDIR} && \
rm -rf /tmp/texlive ${TEXDIR}/*.log

RUN apt update -y && \
apt install -y --no-install-recommends cpanminus make gcc libc6-dev && \
cpanm -n -q Log::Log4perl XString Log::Dispatch::File YAML::Tiny File::HomeDir Unicode::GCString && \
apt remove -y cpanminus make gcc libc6-dev && \
apt clean autoclean && \
apt autoremove -y && \
RUN apt-get update && \
apt-get install -y --no-install-recommends cpanminus make gcc libc6-dev && \
cpanm -n -q --local-lib "${TEXDIR}/perl5" Log::Log4perl XString Log::Dispatch::File YAML::Tiny File::HomeDir Unicode::GCString && \
apt-get remove -y cpanminus make gcc libc6-dev && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/{apt,dpkg,cache,log}/

ENV PATH="/usr/local/texlive/${TEXLIVE_VERSION}/bin/x86_64-linux:${PATH}"

RUN tlmgr update --self --all && \
tlmgr install latexmk latexindent && \
tlmgr update --all && \
Expand Down

0 comments on commit 9df163a

Please sign in to comment.