Skip to content

Commit 8a46bca

Browse files
authored
Optimize wine installation and add cleanup steps
Refactor Dockerfile to improve wine installation and cleanup.
1 parent 9406a3b commit 8a46bca

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

Dockerfile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,32 @@ ENV LANG en_US.UTF-8
1010
ENV LANGUAGE en_US:en
1111
ENV LC_ALL en_US.UTF-8
1212

13-
# steamcmd and wine
13+
# wine, steamcmd
14+
RUN apt-get install -y wget unzip ca-certificates xvfb xauth x11-utils software-properties-common gnupg
15+
RUN wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key -
16+
RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources
1417
RUN dpkg --add-architecture i386
1518
RUN apt-get update
16-
RUN apt-get install -y wget unzip ca-certificates xvfb xauth x11-utils lib32gcc-s1 gnupg software-properties-common
17-
RUN apt-get install -y wine wine64 wine32 libwine libwine:i386 winbind
19+
RUN apt-get install -y --install-recommends winbind winehq-stable
20+
21+
ENV WINEDEBUG -all
22+
ENV WINEARCH win64
23+
ENV WINEPREFIX /opt/wine64
24+
ENV XDG_RUNTIME_DIR /tmp
25+
26+
RUN wineboot --init
27+
1828
RUN mkdir -p /opt/steamcmd && cd /opt/steamcmd && wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz && tar -xvzf steamcmd_linux.tar.gz
1929
ENV PATH=/opt/steamcmd:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2030

2131
# scum server run script
2232
COPY start-server.sh /opt/start-server.sh
2333
RUN chmod +x /opt/start-server.sh
2434

35+
# cleanup
36+
RUN apt-get clean
37+
RUN rm /opt/steamcmd/steamcmd_linux.tar.gz
38+
2539
EXPOSE 27020/udp
2640
EXPOSE 27015/udp
2741
EXPOSE 27015/tcp

0 commit comments

Comments
 (0)