-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
134 lines (85 loc) · 5.5 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
FROM ubuntu:16.04
ARG USERNAME=hoanganhduc
ARG USERHOME=/home/hoanganhduc
ARG USERID=1000
ARG USERGECOS='Duc A. Hoang'
RUN adduser \
--home "$USERHOME" \
--uid $USERID \
--gecos "$USERGECOS" \
--disabled-password \
"$USERNAME"
# Some necessary tools
RUN apt-get update && apt-get install -y software-properties-common wget git make pandoc python-pygments ssh subversion git git-core mercurial mercurial-common secure-delete wipe tree bibtex2html locales
# Update locales
RRUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Extract and Compression
RUN apt-get install -y unace unrar unzip zip lrzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller
# TeXLive
RUN apt-get install -y texlive-full
# Java
RUN apt-get install -y default-jdk
# Build LaTeXML
RUN apt-get install -yqq libarchive-zip-perl libfile-which-perl libimage-size-perl libio-string-perl libjson-xs-perl libtext-unidecode-perl libparse-recdescent-perl liburi-perl libuuid-tiny-perl libwww-perl libxml2 libxml-libxml-perl libxslt1.1 libxml-libxslt-perl imagemagick libimage-magick-perl
RUN git clone https://github.com/brucemiller/LaTeXML.git && cd LaTeXML && perl Makefile.PL && make && make install && cd .. && rm -rf LaTeXML
# Buile IPE
RUN apt-get install -yqq checkinstall zlib1g-dev qtbase5-dev qtbase5-dev-tools libfreetype6-dev libcairo2-dev libjpeg8-dev libpng12-dev liblua5.3-dev
RUN wget https://dl.bintray.com/otfried/generic/ipe/7.2/ipe-7.2.12-src.tar.gz && tar -xvf ipe-7.2.12-src.tar.gz && cd ipe-7.2.12/src && export QT_SELECT=5 && make IPEPREFIX=/usr/local && checkinstall --pkgname=ipe --pkgversion=7.2.12 --backup=no --fstrans=no --default make install IPEPREFIX=/usr/local && ldconfig && cd ../.. && rm -rf ipe-7.2.12*
# Build pdf2htmlEX
#RUN apt-get install -qq -y cmake gcc libgetopt++-dev pkg-config libopenjpeg-dev libfontconfig1-dev libfontforge-dev poppler-data poppler-utils poppler-dbg
# Poppler 0.43.0
#RUN wget "https://poppler.freedesktop.org/poppler-0.43.0.tar.xz" --no-check-certificate && tar -xvf poppler-0.43.0.tar.xz && cd poppler-0.43.0/ && ./configure --enable-xpdf-headers && make && make install && cd .. && rm -rf poppler*
# Fontforge
RUN apt-get install -qq -y packaging-dev pkg-config python-dev libpango1.0-dev libglib2.0-dev libxml2-dev giflib-dbg libjpeg-dev libtiff-dev uthash-dev libspiro-dev
#RUN git clone --depth 1 https://github.com/coolwanglu/fontforge.git && cd fontforge/ && ./bootstrap && ./configure && make && make install && cd .. && rm -rf fontforge
# pdf2htmlEX
#RUN git clone --depth 1 https://github.com/coolwanglu/pdf2htmlEX.git && cd pdf2htmlEX/ && cmake . && make && make install && cd .. && rm -rf pdf2htmlEX
# Build LaTeX2HTML
RUN apt-get install -y netpbm libnetpbm10 libnetpbm10-dev
RUN git clone https://github.com/latex2html/latex2html.git && cd latex2html && ./configure && make && make install && cd .. && rm -rf latex2html
# Build DocOnce
RUN apt-get install -yqq build-essential mercurial subversion python-pip idle python-dev python-setuptools python-pdftools
RUN pip install --upgrade pip
RUN pip install setuptools ipython tornado pyzmq traitlets pickleshare jsonschema
## Preprocessors
RUN pip install future mako
RUN pip install -e git+https://github.com/doconce/preprocess#egg=preprocess
# Publish for handling bibliography
RUN apt-get install -yqq libxml2-dev libxslt1-dev zlib1g-dev
RUN pip install python-Levenshtein lxml
RUN pip install -e hg+https://bitbucket.org/logg/publish#egg=publish
# Sphinx (with additional third/party themes)
RUN pip install sphinx alabaster sphinx_rtd_theme
RUN pip install -e hg+https://bitbucket.org/ecollins/cloud_sptheme#egg=cloud_sptheme
RUN pip install -e git+https://github.com/ryan-roemer/sphinx-bootstrap-theme#egg=sphinx-bootstrap-theme
RUN pip install -e hg+https://bitbucket.org/miiton/sphinxjp.themes.solarized#egg=sphinxjp.themes.solarized
RUN pip install -e git+https://github.com/shkumagai/sphinxjp.themes.impressjs#egg=sphinxjp.themes.impressjs
RUN pip install -e git+https://github.com/kriskda/sphinx-sagecell#egg=sphinx-sagecell
RUN pip install sphinxcontrib-paverutils paver cogapp
RUN pip install -e git+https://bitbucket.org/hplbit/pygments-ipython-console#egg=pygments-ipython-console
RUN pip install -e git+https://github.com/hplgit/pygments-doconce#egg=pygments-doconce
# XHTML
RUN pip install beautifulsoup4 html5lib
# Image manipulation
RUN apt-get install -yqq imagemagick inkscape netpbm mjpegtools pdftk giftrans gv
# DocOnce
RUN git clone https://github.com/hoanganhduc/doconce.git && cd doconce && python setup.py install && cd .. && rm -rf doconce
# Build git-latexdiff
RUN apt-get install -yqq asciidoc && git clone https://gitlab.com/git-latexdiff/git-latexdiff.git && cd git-latexdiff && make install && cd .. && rm -rf git-latexdiff
# Jekyll
RUN apt-get install -y ruby ruby-dev
RUN gem install bundler
RUN wget https://raw.githubusercontent.com/hoanganhduc/hoanganhduc.github.io/source/Gemfile
RUN wget https://raw.githubusercontent.com/hoanganhduc/hoanganhduc.github.io/source/Gemfile.lock
RUN bundle install
RUN rm -rf Gemfile Gemfile.lock
# tzdata
RUN wget http://archive.ubuntu.com/ubuntu/pool/main/t/tzdata/tzdata_2016d-0ubuntu0.16.04_all.deb && dpkg -i tzdata_2016d-0ubuntu0.16.04_all.deb && rm -rf tzdata_2016d-0ubuntu0.16.04_all.deb
# Remove more unnecessary stuff
RUN apt-get --purge remove -y .\*-doc$
RUN apt-get clean -y