From 5787b99a2fe9f8503cd7633311b75d28cffe4d11 Mon Sep 17 00:00:00 2001 From: Till0196 <16399842+Till0196@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:03:29 +0900 Subject: [PATCH] =?UTF-8?q?etoolbox=20l3packages=20xpatch=E3=81=AFsmall?= =?UTF-8?q?=E3=82=A4=E3=83=A1=E3=83=BC=E3=82=B8=E3=81=AB=E5=90=AB=E3=81=BE?= =?UTF-8?q?=E3=82=8C=E3=81=A6=E3=81=84=E3=82=8B=E3=81=AE=E3=81=A7=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 07ad344..5656630 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,19 +2,20 @@ FROM ubuntu:noble AS base ARG TARGETARCH FROM base AS build-arm64 -ENV AWS_CLI_ARCH=linux-aarch64 -ENV TEX_LIVE_ARCH=aarch64-linux +ARG AWS_CLI_ARCH=linux-aarch64 +ARG TEX_LIVE_ARCH=aarch64-linux FROM base AS build-amd64 -ENV AWS_CLI_ARCH=linux-x86_64 -ENV TEX_LIVE_ARCH=x86_64-linux +ARG AWS_CLI_ARCH=linux-x86_64 +ARG TEX_LIVE_ARCH=x86_64-linux FROM build-${TARGETARCH} # WORD内部向けコンテナなので、何か問題が有ったらSlack上で通知して下さい。 LABEL maintainer="Totsugekitai <37617413+Totsugekitai@users.noreply.github.com>" -ENV PERSISTENT_DEPS="tzdata tar fontconfig unzip wget curl make perl ghostscript bash git groff less fonts-ebgaramond" +ARG PERSISTENT_DEPS="ca-certificates tzdata tar fontconfig unzip wget curl \ + make perl ghostscript bash git groff less fonts-ebgaramond" # キャッシュ修正とパッケージインストールは同時にやる必要がある RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ @@ -23,7 +24,7 @@ RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \ apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y \ + DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ $PERSISTENT_DEPS # install awscliv2 @@ -32,10 +33,10 @@ RUN curl "https://awscli.amazonaws.com/awscli-exe-$AWS_CLI_ARCH.zip" -o "awscliv ./aws/install && \ rm -r ./aws awscliv2.zip -ENV FONT_URLS="https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip \ +ARG FONT_URLS="https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip \ https://github.com/adobe-fonts/source-han-sans/releases/latest/download/SourceHanSansJP.zip \ https://github.com/adobe-fonts/source-han-serif/raw/release/SubsetOTF/SourceHanSerifJP.zip" -ENV FONT_PATH="/usr/share/fonts/" +ARG FONT_PATH="/usr/share/fonts/" RUN mkdir -p $FONT_PATH && \ wget $FONT_URLS && \ unzip -j "*.zip" "*.otf" -d $FONT_PATH && \ @@ -70,19 +71,19 @@ RUN echo "Set PATH to $PATH" && \ # tlmgr section RUN tlmgr update --self +ARG DEPS_FOR_TLMGR="latexmk collection-luatex collection-langjapanese \ + collection-fontsrecommended type1cm mdframed needspace newtx \ + fontaxes boondox everyhook svn-prov framed subfiles titlesec tocdata \ + biblatex pbibtex-base logreq biber import environ trimspaces tcolorbox \ + ebgaramond algorithms algorithmicx xstring siunitx bussproofs enumitem" + # /tlmgr-pkgsにtlmgrのパッケージをバックアップして次回以降のビルド時に再利用する # package install RUN --mount=type=cache,target=/tlmgr-pkgs,sharing=locked \ tlmgr restore --force --backupdir /tlmgr-pkgs --all || true && \ - tlmgr install --no-persistent-downloads \ - latexmk collection-luatex collection-langjapanese \ - collection-fontsrecommended type1cm mdframed needspace newtx \ - fontaxes boondox everyhook svn-prov framed subfiles titlesec \ - tocdata xpatch etoolbox l3packages \ - biblatex pbibtex-base logreq biber import environ trimspaces tcolorbox \ - ebgaramond algorithms algorithmicx xstring siunitx bussproofs enumitem && \ + tlmgr install --no-persistent-downloads ${DEPS_FOR_TLMGR} && \ tlmgr backup --clean --backupdir /tlmgr-pkgs --all && \ - tlmgr backup --backupdir /tlmgr-pkgs --all && \ + tlmgr backup ${DEPS_FOR_TLMGR} --backupdir /tlmgr-pkgs && \ tlmgr path add # EBGaramond @@ -91,9 +92,9 @@ RUN cp /usr/share/fonts/opentype/ebgaramond/EBGaramond12-Regular.otf "/usr/share luaotfload-tool --update # Install Pandoc -ENV PANDOC_VERSION="3.5" -ENV PANDOC_DOWNLOAD_URL="https://github.com/jgm/pandoc/releases/download/$PANDOC_VERSION/pandoc-$PANDOC_VERSION-linux-$TARGETARCH.tar.gz" -ENV PANDOC_ROOT="/usr/local/bin/pandoc" +ARG PANDOC_VERSION="3.5" +ARG PANDOC_DOWNLOAD_URL="https://github.com/jgm/pandoc/releases/download/$PANDOC_VERSION/pandoc-$PANDOC_VERSION-linux-$TARGETARCH.tar.gz" +ARG PANDOC_ROOT="/usr/local/bin/pandoc" RUN wget -qO- "$PANDOC_DOWNLOAD_URL" | tar -xzf - && \ cp pandoc-$PANDOC_VERSION/bin/pandoc $PANDOC_ROOT && \ rm -Rf pandoc-$PANDOC_VERSION/