|
1 |
| -FROM ubuntu:22.04 |
2 |
| -LABEL maintainer="Yves Chevallier <yves.chevallier@heig-vd.ch>" |
| 1 | +FROM nowox/latex:3.0 |
3 | 2 |
|
4 |
| -ARG USERNAME=latex |
5 |
| -ARG WORKDIR=/latex |
6 |
| -ARG USER_UID=1000 |
7 |
| -ARG USER_GID=$USER_UID |
8 |
| -ARG DEBIAN_FRONTEND=noninteractive |
9 |
| - |
10 |
| -RUN apt-get update |
11 |
| - |
12 |
| -# Texlive |
13 |
| -RUN apt-get install -y latexmk biber |
14 |
| -RUN apt-get install -y texlive-base \ |
15 |
| - texlive-binaries \ |
16 |
| - texlive-extra-utils \ |
17 |
| - texlive-lang-french \ |
18 |
| - texlive-latex-base \ |
19 |
| - texlive-xetex \ |
20 |
| - texlive-pstricks \ |
21 |
| - texlive-pictures \ |
22 |
| - texlive-latex-recommended \ |
23 |
| - texlive-science \ |
24 |
| - texlive-fonts-extra |
25 |
| - |
26 |
| -# Python |
27 |
| -RUN apt-get install -y git python3 python3-pip |
28 |
| - |
29 |
| -# Inkscape |
30 |
| -RUN apt-get install -y inkscape |
31 |
| - |
32 |
| -# Additional utilities |
33 |
| -RUN apt-get install -y wget xvfb locales sudo |
34 |
| - |
35 |
| -# Pygments for LaTeX minted |
36 |
| -RUN pip install control Pygments |
37 |
| - |
38 |
| -# Draw.io for building figures |
39 |
| -RUN apt-get install -y libnotify4 libxss1 xdg-utils libsecret-1-0 libappindicator3-1 libgbm1 libasound2 |
40 |
| -RUN wget https://github.com/jgraph/drawio-desktop/releases/download/v20.2.3/drawio-amd64-20.2.3.deb |
41 |
| -RUN dpkg -i drawio-amd* |
42 |
| - |
43 |
| -# Set the locale |
44 |
| -RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen |
45 |
| -ENV LANG en_US.UTF-8 |
46 |
| -ENV LANGUAGE en_US:en |
47 |
| -ENV LC_ALL en_US.UTF-8 |
48 |
| - |
49 |
| -# Update font cache |
50 |
| -RUN fc-cache -fv |
51 |
| - |
52 |
| -# User |
53 |
| -WORKDIR /latex |
54 | 3 | # USER $USERNAME
|
55 | 4 | # ENV USER=${USERNAME}
|
56 | 5 | # RUN useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
|
57 | 6 | # RUN groupadd --gid $USER_GID $USERNAME
|
58 | 7 | # RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
|
59 | 8 | # RUn chmod 0440 /etc/sudoers.d/$USERNAME
|
60 | 9 |
|
61 |
| -# Clear cache, man page and documentation |
62 |
| -RUN apt-get clean -y &&\ |
63 |
| - rm -rf /var/lib/apt/lists/* &&\ |
64 |
| - rm -rf /usr/share/man &&\ |
65 |
| - rm -f /etc/ssh/ssh_host_* &&\ |
66 |
| - mkdir -p /usr/share/man &&\ |
67 |
| - find /usr/share/doc -depth -type f ! -name copyright -delete &&\ |
68 |
| - find /usr/share/doc -type f -name "*.pdf" -delete &&\ |
69 |
| - find /usr/share/doc -type f -name "*.gz" -delete &&\ |
70 |
| - find /usr/share/doc -type f -name "*.tex" -delete &&\ |
71 |
| - (find /usr/share/doc -type d -empty -delete || true) &&\ |
72 |
| - mkdir -p /usr/share/doc &&\ |
73 |
| - rm -rf /var/cache/apt/archives &&\ |
74 |
| - mkdir -p /var/cache/apt/archives &&\ |
75 |
| - rm -rf /tmp/* /var/tmp/* &&\ |
76 |
| - (find /usr/share/ -type f -empty -delete || true) &&\ |
77 |
| - (find /usr/share/ -type d -empty -delete || true) &&\ |
78 |
| - mkdir -p /usr/share/texmf/source &&\ |
79 |
| - mkdir -p /usr/share/texlive/texmf-dist/source |
80 |
| - |
81 |
| - |
82 | 10 | # Bind bashrc
|
83 | 11 | # ADD .bashrc /root/.bashrc
|
84 | 12 | # ADD .bashrc /home/${USERNAME}/.bashrc
|
0 commit comments