-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbase.Dockerfile
68 lines (51 loc) · 2.61 KB
/
base.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
# Use the `jammy` variant of the buildpack-deps image as the base image.
# It is based on Ubuntu and includes common tools and libraries such as Git, GCC, and OpenSSL, as well as programming languages like Ruby, Node.js, and Python.
ARG VARIANT="jammy"
FROM buildpack-deps:${VARIANT}-curl
# Accept the Microsoft EULA for the fonts (Arial).
RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections
# Install additional OS packages and clean up.
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y --no-install-recommends build-essential cpanminus libbz2-dev libc6-dev libbtparse-dev libdatetime-perl libexpat1-dev libffi-dev libgdbm-dev liblzma-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev libxml2 libxml2-dev libxslt1.1 libxslt1-dev llvm locales make python3-pygments tk-dev ttf-mscorefonts-installer zlib1g-dev \
&& apt-get clean autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# Install required Perl module.
RUN cpanm Module::Build
# Generate the German locale and set it as the default.
RUN locale-gen de_DE.UTF-8
ENV LANG de_DE.UTF-8
ENV LANGUAGE de_DE:de
ENV LC_ALL de_DE.UTF-8
### BIBER ###
WORKDIR /biber
# Download the source code of the required Biber version and extract it.
RUN wget -qO - https://github.com/plk/biber/archive/v2.20/biber-2.20.tar.gz | tar xz --strip-components=1
# Install all dependencies automatically using Build.PL.
RUN perl ./Build.PL && ./Build installdeps
# Build the required Biber binary.
RUN ./Build && ./Build install
# Clean up.
RUN rm -rf /biber
### TEXLIVE ###
WORKDIR /texlive
# Define environment variables for TeX Live.
ENV TEXDIR /usr/local/texlive
ENV TEXUSERDIR ~/.texlive
ENV TEXMFHOME /home/vscode/texmf
ENV TEXMFLOCAL $TEXDIR/texmf-local
# Install the latest version of TeX Live and add it to the path.
RUN wget -qO - https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz | tar xz --strip-components=1 \
&& perl ./install-tl --no-interaction --scheme=basic --no-doc-install --no-src-install --texdir=$TEXDIR --texuserdir=$TEXUSERDIR --repository https://mirror.ctan.org/systems/texlive/tlnet
ENV PATH $TEXDIR/bin/aarch64-linux:$TEXDIR/bin/x86_64-linux:$PATH
# Clean up.
RUN rm -rf /texlive
### VSCODE USER ###
WORKDIR /home/vscode
# Create the "vscode" user.
RUN groupadd -g 1000 vscode && useradd -r -u 1000 -g vscode vscode
# Change the owner of the home directory to the "vscode" user.
RUN chown -R vscode:vscode /home/vscode
# Change the owner of the TeX Live installation to the "vscode" user.
RUN chown -R vscode:vscode $TEXDIR