-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (55 loc) · 1.96 KB
/
Copy pathDockerfile
File metadata and controls
60 lines (55 loc) · 1.96 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
# Unreal Tournament 2004 Container for Rocky Linux
# Based on Rocky Linux 9
FROM rockylinux:9
# Copy entrypoint script (must be done as root)
COPY --chown=root:root entrypoint.sh /usr/local/bin/entrypoint.sh
# Single layer: Install dependencies, setup user, configure Wine
RUN dnf install -y epel-release && \
dnf config-manager --set-enabled crb && \
dnf install -y --allowerasing \
wine \
mesa-libOSMesa \
xorg-x11-server-Xvfb \
xorg-x11-xauth \
mesa-dri-drivers \
mesa-libGL \
libX11 \
libXext \
libXrender \
libXi \
libXrandr \
alsa-lib \
pulseaudio-libs \
curl \
wget \
unzip \
cabextract \
python3 && \
wget -O /usr/local/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks && \
chmod +x /usr/local/bin/winetricks /usr/local/bin/entrypoint.sh && \
useradd -m -u 1000 ut2004 && \
mkdir -p /home/ut2004/ut2004 /data/server /data/config /data/addons && \
chown -R ut2004:ut2004 /home/ut2004 /data && \
dnf clean all && \
su - ut2004 -c 'export HOME=/home/ut2004 && \
export WINEPREFIX=/home/ut2004/.wine && \
export DISPLAY=:0 && \
export WINEDLLOVERRIDES="mscoree,mshtml=" && \
xvfb-run -a wineboot --init || true && \
xvfb-run -a winetricks -q d3dx9 || true && \
xvfb-run -a winetricks -q d3dcompiler_43 || true && \
xvfb-run -a winetricks -q vcrun2005 || true && \
xvfb-run -a winetricks -q vcrun2008 || true && \
xvfb-run -a winetricks -q vcrun2010 || true && \
xvfb-run -a winetricks -q corefonts || true'
# Set up Wine environment
USER ut2004
ENV HOME=/home/ut2004
ENV WINEPREFIX=/home/ut2004/.wine
ENV DISPLAY=:0
ENV WINEDLLOVERRIDES="mscoree,mshtml="
# Set working directory
WORKDIR /home/ut2004/ut2004
# Use entrypoint script
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["/bin/bash"]