-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpeWorkerDockerfile
More file actions
75 lines (65 loc) · 2.67 KB
/
peWorkerDockerfile
File metadata and controls
75 lines (65 loc) · 2.67 KB
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
FROM python:3.13-bookworm
ENV PYTHONUNBUFFERED=0
RUN mkdir /decompilers
WORKDIR /decompilers
ENV HOME=/home/root
COPY requirements_worker.txt /tmp/requirements_worker.txt
COPY requirements_test.txt /tmp/requirements_test.txt
RUN pip install --upgrade pip && \
pip --retries 10 install -r /tmp/requirements_worker.txt
# C#: Set wine to use x86 instead of x64
ENV WINEARCH=win32
# Generic
RUN apt-get update && \
apt-get install --no-install-recommends -y build-essential apt-transport-https && \
apt-get install --no-install-recommends -y ca-certificates \
openssl \
gnutls-bin \
host \
unzip \
xauth \
xvfb \
zenity \
zlib1g \
zlib1g-dev && \
update-ca-certificates && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
# C#: Wine and wine's utils.
RUN dpkg --add-architecture i386 && \
apt-get update && \
wget -nc https://dl.winehq.org/wine-builds/winehq.key && \
apt-key add winehq.key && \
echo "deb https://dl.winehq.org/wine-builds/debian/ bookworm main" >> /etc/apt/sources.list.d/wine.list && \
apt-get update && \
apt install --assume-yes --allow-unauthenticated winehq-devel:i386 \
wine-devel:i386 \
wine-devel-i386:i386 \
fonts-wine \
cabextract && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
# Add Microsoft TLS G2 ECC CA OCSP 02.crt to ca-certificates
# Without this wget https://download.microsoft.com fails due to cert error.
RUN wget --user-agent="Mozilla/5.0 (X11; Linux x86_64)" https://www.microsoft.com/pkiops/certs/Microsoft%20TLS%20G2%20ECC%20CA%20OCSP%2002.crt && \
openssl x509 -inform DER -in "Microsoft TLS G2 ECC CA OCSP 02.crt" -out microsoft-tls-g2-ecc-ocsp-02.crt && \
cp microsoft-tls-g2-ecc-ocsp-02.crt /usr/local/share/ca-certificates/ && \
update-ca-certificates
# C#: Winetricks, dotnet45, vcrun2010
RUN echo "Installing winetricks" && \
wget -nc -nv https://github.com/Winetricks/winetricks/archive/20260125.zip -O /tmp/winetricks.zip && \
unzip /tmp/winetricks.zip -d /tmp/winetricks/ && \
make -C /tmp/winetricks/winetricks-20260125 install && \
rm -rf /tmp/winetricks.zip && \
rm -rf /tmp/winetricks && \
mkdir -p /home/root/.cache/winetricks/ && \
echo "Winetricks installed"
# cache corefonts to prevent 429 in archive.org
COPY winetricks/corefonts/ /home/root/.cache/winetricks/corefonts/
# Dotnet45 should be installed on a different docker step. Otherwise, it will fail.
RUN echo "Installing Dotnet45" && \
winetricks -q --force dotnet45 corefonts && \
echo "Dotnet45 installed"
RUN xvfb-run winetricks -q vcrun2010 && \
echo "vcrun2010 installed"
RUN ln -Ts /decompilers/ /daas