Skip to content

Commit

Permalink
Dockerfileの警告が出ないようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
Till0196 committed Nov 12, 2024
1 parent 11322c5 commit 3d9ca62
Showing 1 changed file with 15 additions and 29 deletions.
44 changes: 15 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,19 @@ FROM ubuntu:noble AS base
ARG TARGETARCH

FROM base AS build-arm64
ENV AWS_CLI_ARCH linux-aarch64
ENV TEX_LIVE_ARCH aarch64-linux
ENV AWS_CLI_ARCH=linux-aarch64
ENV TEX_LIVE_ARCH=aarch64-linux

FROM base AS build-amd64
ENV AWS_CLI_ARCH linux-x86_64
ENV TEX_LIVE_ARCH x86_64-linux
ENV AWS_CLI_ARCH=linux-x86_64
ENV TEX_LIVE_ARCH=x86_64-linux

FROM build-${TARGETARCH}

# WORD内部向けコンテナなので、何か問題が有ったらSlack上で通知して下さい。
LABEL maintainer "Totsugekitai <[email protected]>"

ENV PERSISTENT_DEPS \
tar \
fontconfig \
unzip \
wget \
curl \
make \
perl \
ghostscript \
bash \
git \
groff \
less \
fonts-ebgaramond
LABEL maintainer="Totsugekitai <[email protected]>"

ENV PERSISTENT_DEPS="tar fontconfig unzip wget curl make perl ghostscript bash git groff less fonts-ebgaramond"

# キャッシュ修正とパッケージインストールは同時にやる必要がある
RUN apt-get update && \
Expand All @@ -40,11 +27,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 \
ENV 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/
https://github.com/adobe-fonts/source-han-serif/raw/release/SubsetOTF/SourceHanSerifJP.zip"
ENV FONT_PATH="/usr/share/fonts/"
RUN mkdir -p $FONT_PATH && \
wget $FONT_URLS && \
unzip -j "*.zip" "*.otf" -d $FONT_PATH && \
Expand Down Expand Up @@ -76,8 +62,8 @@ COPY --from=registry.gitlab.com/islandoftex/images/texlive:TL2024-2024-11-10-sma
RUN echo "Set PATH to $PATH" && \
$(find /usr/local/texlive -name tlmgr) path add

ENV TEX_LIVE_VERSION 2024
ENV PATH /usr/local/texlive/$TEX_LIVE_VERSION/bin/$TEX_LIVE_ARCH:$PATH
ENV TEX_LIVE_VERSION="2024"
ENV PATH="/usr/local/texlive/$TEX_LIVE_VERSION/bin/$TEX_LIVE_ARCH:$PATH"

# tlmgr section
RUN tlmgr update --self
Expand All @@ -97,9 +83,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
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"
RUN wget -qO- "$PANDOC_DOWNLOAD_URL" | tar -xzf - && \
cp pandoc-$PANDOC_VERSION/bin/pandoc $PANDOC_ROOT && \
rm -Rf pandoc-$PANDOC_VERSION/
Expand Down

0 comments on commit 3d9ca62

Please sign in to comment.