|
| 1 | +FROM debian:bookworm-slim |
| 2 | +LABEL maintainer= "[email protected]" |
| 3 | + |
| 4 | +# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope |
| 5 | +ARG TARGETARCH |
| 6 | + |
| 7 | +ENV REVIEW_VERSION 5.9.0 |
| 8 | +ENV NODEJS_VERSION 20 |
| 9 | + |
| 10 | +# ENV PANDOC_VERSION 2.17.1.1 |
| 11 | +# ENV PANDOC_DEB_VERSION 2.17.1.1-1 |
| 12 | + |
| 13 | +ENV LANG en_US.UTF-8 |
| 14 | +ENV DEBIAN_FRONTEND noninteractive |
| 15 | + |
| 16 | +# setup |
| 17 | +RUN apt-get update && \ |
| 18 | + apt-get install -y --no-install-recommends \ |
| 19 | + locales git-core curl ca-certificates && \ |
| 20 | + apt-get clean && \ |
| 21 | + rm -rf /var/lib/apt/lists/* |
| 22 | +RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen |
| 23 | +RUN locale-gen en_US.UTF-8 && update-locale en_US.UTF-8 |
| 24 | + |
| 25 | +# for Debian Bug#955619 |
| 26 | +RUN mkdir -p /usr/share/man/man1 |
| 27 | + |
| 28 | +# install Re:VIEW environment |
| 29 | +RUN apt-get update && \ |
| 30 | + apt-get install -y --no-install-recommends \ |
| 31 | + texlive-lang-japanese texlive-fonts-recommended texlive-latex-extra lmodern fonts-lmodern cm-super tex-gyre fonts-texgyre texlive-pictures texlive-plain-generic \ |
| 32 | + texlive-luatex \ |
| 33 | + ghostscript gsfonts \ |
| 34 | + zip ruby-zip \ |
| 35 | + ruby-nokogiri mecab ruby-mecab mecab-ipadic-utf8 poppler-data \ |
| 36 | + plantuml \ |
| 37 | + ruby-dev build-essential \ |
| 38 | + mecab-jumandic- mecab-jumandic-utf8- \ |
| 39 | + texlive-extra-utils poppler-utils && \ |
| 40 | + apt-get clean && \ |
| 41 | + rm -rf /var/lib/apt/lists/* |
| 42 | +## if you want to use ipa font instead of haranoaji font, use this settings |
| 43 | +# RUN kanji-config-updmap ipaex |
| 44 | + |
| 45 | +# setup Re:VIEW |
| 46 | +RUN gem install bundler rake -N && \ |
| 47 | + gem install review -v "$REVIEW_VERSION" -N && \ |
| 48 | + gem install pandoc2review -N && \ |
| 49 | + gem install rubyzip -N |
| 50 | + |
| 51 | +# install node.js environment |
| 52 | +RUN apt-get update && \ |
| 53 | + apt-get install -y --no-install-recommends \ |
| 54 | + gnupg && \ |
| 55 | + apt-get clean && \ |
| 56 | + rm -rf /var/lib/apt/lists/* |
| 57 | +RUN curl -sL https://deb.nodesource.com/setup_${NODEJS_VERSION}.x | bash - |
| 58 | +RUN apt-get update && \ |
| 59 | + apt-get install -y --no-install-recommends \ |
| 60 | + nodejs && \ |
| 61 | + apt-get clean && \ |
| 62 | + rm -rf /var/lib/apt/lists/* && \ |
| 63 | + npm install -g yarn |
| 64 | + |
| 65 | +RUN kanji-config-updmap-sys haranoaji |
| 66 | + |
| 67 | +## install pandoc |
| 68 | +# RUN curl -sL -o /tmp/pandoc.deb "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_DEB_VERSION}-${TARGETARCH}.deb" && \ |
| 69 | +# dpkg -i /tmp/pandoc.deb && \ |
| 70 | +# rm /tmp/pandoc.deb |
| 71 | +## pandoc2review doesn't support pandoc 3. So just use Debian's version |
| 72 | +RUN apt-get update && apt-get -y install pandoc && \ |
| 73 | + apt-get clean && \ |
| 74 | + rm -rf /var/lib/apt/lists/* |
| 75 | + |
| 76 | +## Playwright support with fonts. This consumes ~350MB |
| 77 | +RUN apt-get update && apt-get -y install --no-install-recommends fonts-noto-cjk-extra fonts-noto-color-emoji libatk1.0-0 libatk-bridge2.0-0 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 && \ |
| 78 | + apt-get clean && \ |
| 79 | + rm -rf /var/lib/apt/lists/* |
| 80 | +RUN npm install -g playwright && rm -rf /root/.cache/ms-playwright/firefox* /root/.cache/ms-playwright/webkit* && gem install playwright-runner -N |
| 81 | + |
| 82 | +## set cache folder to work folder (disabled by default) |
| 83 | +# RUN mkdir -p /etc/texmf/texmf.d && echo "TEXMFVAR=/work/.texmf-var" > /etc/texmf/texmf.d/99local.cnf |
0 commit comments