Skip to content

Instantly share code, notes, and snippets.

@marks
Created April 20, 2017 20:36
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 marks/f5119cb557c5be93df9f76c0185927f7 to your computer and use it in GitHub Desktop.
Save marks/f5119cb557c5be93df9f76c0185927f7 to your computer and use it in GitHub Desktop.
RUN \
yum install -y gmp-devel latex2rtf
# Install relatively up-to-date Haskell and Cabal
RUN \
mkdir -p /tmp/tex && \
cd /tmp/tex && \
wget http://www.haskell.org/ghc/dist/7.8.2/ghc-7.8.2-x86_64-unknown-linux-centos65.tar.bz2 && \
tar xf ghc-7.8.2-x86_64-unknown-linux-centos65.tar.bz2 && \
cd ghc-7.8.2 && \
./configure && \
make install && \
cd .. && \
wget http://www.haskell.org/cabal/release/cabal-install-1.20.0.3/cabal-install-1.20.0.3.tar.gz && \
tar xf cabal-install-1.20.0.3.tar.gz && \
cd cabal-install-1.20.0.3 && \
./bootstrap.sh --global && \
rm -rf /tmp/tex
# Update Cabal
RUN \
cabal update && \
(localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || true)
ENV LANG en_US.UTF-8
# Install Pandoc (takes ages)
RUN cabal install --global pandoc pandoc-citeproc
# Install missing Tex dependencies for knitting PDFs
RUN \
mkdir -p /tmp/tex && \
cd /tmp/tex && \
wget http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/ifluatex.dtx && \
tex ifluatex.dtx && \
mv ifluatex.sty /usr/share/texmf/tex/generic/oberdiek && \
wget http://mirrors.ctan.org/install/macros/generic/ifxetex.tds.zip && \
unzip ifxetex.tds.zip && \
mv tex/generic/ifxetex /usr/share/texmf/tex/latex && \
texhash && \
rm -rf /tmp/tex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment