Skip to content

Instantly share code, notes, and snippets.

@TsutomuNakamura
Last active November 8, 2018 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TsutomuNakamura/93f77ff665da24b4abc3c99d72d0f703 to your computer and use it in GitHub Desktop.
Save TsutomuNakamura/93f77ff665da24b4abc3c99d72d0f703 to your computer and use it in GitHub Desktop.
Dokerfile for mediawiki with LaTeX
# https://hub.docker.com/_/mediawiki/
FROM mediawiki:latest
# Change the repository location of the repository for people who lives in Japan.
RUN VAR=$(grep -E '^deb .*' /etc/apt/sources.list | head -1 | awk '{print $3}') && \
echo "deb http://ftp.jp.debian.org/debian/ stretch ${VAR} main contrib non-free" > /etc/apt/sources.list && \
echo "deb http://ftp.jp.debian.org/debian ${VAR}-updates main contrib" >> /etc/apt/sources.list
# https://www.mediawiki.org/wiki/Extension:Math/advancedSettings#Installing_texvc
RUN apt-get update && \
apt-get install -y build-essential dvipng ocaml texlive-fonts-recommended texlive-lang-greek texlive-latex-recommended texlive dvipng
# * Math extension
# Check the latest Math extension at "https://www.mediawiki.org/wiki/Extension:Math".
# Download link may be located at right side of the page.
COPY extensions/Math.tar.gz /var/www/html/extensions/Math.tar.gz
RUN cd /var/www/html/extensions && \
tar -zxf Math.tar.gz && \
rm -f Math.tar.gz && \
cd Math && \
make && \
rm math/*.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment