-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
57 lines (46 loc) · 1.71 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
# A Dockerfile to use testing PlasTeX using Tox
#
# see: https://github.com/plastex/plastex/blob/master/CONTRIBUTING.md
# see: https://tox.wiki/en/latest/
# see: https://github.com/pyenv/pyenv
# see: https://virtualenv.pypa.io/en/latest/user_guide.html
# see: https://tug.org/texlive/
FROM python
# We work in /root (since then a `cd` puts us home)
WORKDIR /root
RUN mkdir /root/plastex /root/toxDir
# Add the packages required to build Python
RUN apt-get update && \
apt-get --yes upgrade && \
apt-get --yes install \
build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
libffi-dev liblzma-dev
# Add some useful packages as well as the TeXLive environment
# to provide any LaTeX tools PlasTex might want
RUN apt-get --yes install \
dvisvgm dvipng imagemagick inkscape pdf2svg poppler-utils \
texlive-binaries texlive-latex-base texlive-latex-extra \
texlive-extra-utils texlive-xetex texlive less tree nano
# Install Tox
RUN pip install tox
# Install Pyenv in the /pyenv directory
RUN git clone https://github.com/pyenv/pyenv.git /pyenv && \
cd /pyenv && src/configure && make -C src
# Add Pyenv to the system path
ENV PYENV_ROOT=/pyenv
ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"
# Install the various Pythons required by the PlaxTeX Tox.ini
RUN pyenv install 3.6 && \
pyenv install 3.7 && \
pyenv install 3.8 && \
pyenv install 3.9 && \
pyenv install 3.10 && \
pyenv install 3.11 && \
pyenv install 3.12 && \
pyenv global 3.7 3.8 3.9 3.10 3.11 3.12
ENTRYPOINT [ "/bin/bash" ]
# This is the typical Tox command used to run tox on the PlasTex sources
#
# tox --conf plastex/tox.ini --workdir /toxDir