Skip to content

Commit

Permalink
Add pandoc and pandoc-filter install to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
y-yu committed Apr 11, 2023
1 parent 819cbc0 commit dbbf295
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name: CI
jobs:
build-image:
name: Build and push image
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

Expand Down
22 changes: 19 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ ENV PERSISTENT_DEPS \
less \
fonts-ebgaramond

ENV TEXLIVE_PATH /usr/local/texlive
ENV PATH $TEXLIVE_PATH/bin/x86_64-linux:$PATH

# キャッシュ修正とパッケージインストールは同時にやる必要がある
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
Expand All @@ -46,6 +43,7 @@ RUN cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
echo 'Asia/Tokyo' > /etc/timezone

# Install TeXLive
ENV TEXLIVE_PATH /usr/local/texlive
RUN mkdir -p /tmp/install-tl-unx && \
wget -qO- http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz | \
tar -xz -C /tmp/install-tl-unx --strip-components=1 && \
Expand Down Expand Up @@ -76,6 +74,24 @@ RUN cp /usr/share/fonts/opentype/ebgaramond/EBGaramond12-Regular.otf /usr/share/
fc-cache -frvv && \
luaotfload-tool --update

ARG TARGETARCH

# Install Pandoc
ENV PANDOC_VERSION 3.1.2
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/

# Install Pandocfilter
COPY requirements.txt ./
RUN pip install --upgrade pip && \
pip install -r requirements.txt && \
rm requirements.txt

ENV PATH $TEXLIVE_PATH/bin/x86_64-linux:$TEXLIVE_PATH/bin/aarch64-linux:$PATH

VOLUME ["/workdir"]

WORKDIR /workdir
Expand Down

0 comments on commit dbbf295

Please sign in to comment.