Skip to content

Instantly share code, notes, and snippets.

@davetron5000
Created November 9, 2023 21:50
Show Gist options
  • Save davetron5000/6ee0e3a19d034cc8391ac1576bca2734 to your computer and use it in GitHub Desktop.
Save davetron5000/6ee0e3a19d034cc8391ac1576bca2734 to your computer and use it in GitHub Desktop.
Dockerfile to get pandoc and LaTeX
FROM debian:bullseye
ENV DEBIAN_FRONTEND noninteractive
# A base on which to work.
RUN apt-get clean && apt-get update -q && apt-get install -qy \
build-essential \
curl \
git \
make \
man \
netcat \
procps \
rsync \
software-properties-common \
wget
# Without munging all this locale stuff, things get very strange
# and you get perl errors and it's just a huge mess.
RUN apt-get install -y locales && \
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
update-locale en_US.UTF-8
ENV LANG=en_US.utf8
ENV LANGUAGE=en_US.utf8
# This is a doozy
RUN apt-get install -qy texlive-full
RUN wget -O /tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-arm64.deb && dpkg -i /tmp/pandoc.deb
# This is needed for syntax highlighting and possibly graphgviz
RUN apt-get install -qy \
python3-pygments gnuplot
RUN apt-get install -qy graphviz fonts-rufscript fonts-inconsolata && fc-cache -fv
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -qy nodejs
# At some point Debian decided ImageMagick could not do PDFs. So this fixes that.
RUN cat /etc/ImageMagick-6/policy.xml | sed 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' > /tmp/policy.xml && mv /tmp/policy.xml /etc/ImageMagick-6/policy.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment