Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pandoc install to Dockerfile #27

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

y-yu
Copy link
Member

@y-yu y-yu commented Apr 10, 2023

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 - && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <DL4001> reported by reviewdog 🐶
Either use Wget or Curl but not both

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 - && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <DL4006> reported by reviewdog 🐶
Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Dockerfile Outdated
rm -Rf pandoc-$PANDOC_VERSION/

# Install Pandocfilter
COPY requirements.txt ./

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <DL3045> reported by reviewdog 🐶
COPY to a relative destination without WORKDIR set.

Dockerfile Outdated

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <DL3013> reported by reviewdog 🐶
Pin versions in pip. Instead of pip install <package> use pip install <package>==<version> or pip install --requirement <requirements file>

Dockerfile Outdated

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <DL3042> reported by reviewdog 🐶
Avoid use of cache directory with pip. Use pip install --no-cache-dir <package>

@@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

利用する直前に移動させることで、このENVを編集してdocker buildのやり直しになるレイヤーを削減する。

ARG TARGETARCH

# Install Pandoc
ENV PANDOC_VERSION 3.1.2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dockerfile Outdated
pip install -r requirements.txt && \
rm requirements.txt

ENV PATH $TEXLIVE_PATH/bin/x86_64-linux:$TEXLIVE_PATH/bin/aarch64-linux:$PATH
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aarch64にも(雑に?)対応させた。

@@ -12,7 +12,7 @@ name: CI
jobs:
build-image:
name: Build and push image
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一生はじまらないのでubuntu-latestにした。2022年12月に消えてるっぽい。

@y-yu y-yu force-pushed the add-pandoc-and-pandoc-filter branch from dbbf295 to eb03c9f Compare April 11, 2023 16:35
@y-yu y-yu changed the title Add pandoc and pandoc-filter install to Dockerfile Add pandoc install to Dockerfile Apr 11, 2023
@y-yu y-yu force-pushed the add-pandoc-and-pandoc-filter branch from 83daa03 to 621f606 Compare April 11, 2023 17:01
@puripuri2100
Copy link
Member

mergeしちゃいます

@puripuri2100 puripuri2100 merged commit 08dec21 into master Apr 12, 2023
@puripuri2100 puripuri2100 deleted the add-pandoc-and-pandoc-filter branch April 12, 2023 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants