-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
102 lines (91 loc) · 2.71 KB
/
Dockerfile
File metadata and controls
102 lines (91 loc) · 2.71 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# --------------------------
# Base Image
# --------------------------
FROM docker.io/library/ubuntu:24.04
# --------------------------
# General Environment Variables
# --------------------------
ENV DEBIAN_FRONTEND="noninteractive"
ENV WINEARCH="win64"
# --------------------------
# Install Essential Packages
# --------------------------
RUN set -x \
&& apt update \
&& apt upgrade -y \
&& apt install -y \
vim \
wget \
software-properties-common \
locales \
tini \
&& locale-gen en_US.UTF-8 \
&& update-locale LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# --------------------------
# Install SteamCMD and Dependencies
# --------------------------
RUN add-apt-repository -y multiverse \
&& dpkg --add-architecture i386 \
&& apt update \
&& echo steam steam/question select "I AGREE" | debconf-set-selections && echo steam steam/license note '' | debconf-set-selections \
&& apt install -y \
lib32z1 \
lib32gcc-s1 \
lib32stdc++6 \
steamcmd \
&& groupadd steam \
&& useradd -m steam -g steam \
&& passwd -d steam \
&& chown -R steam:steam /usr/games \
&& ln -s /usr/games/steamcmd /home/steam/steamcmd
# --------------------------
# Install Wine and Winetricks
# --------------------------
RUN dpkg --add-architecture amd64 \
&& mkdir -pm755 /etc/apt/keyrings \
&& wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key \
&& wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources \
&& apt update \
&& apt install -y --install-recommends \
winehq-staging \
&& apt install -y --allow-unauthenticated \
cabextract \
winbind \
screen \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# --------------------------
# Create Server Directories
# --------------------------
RUN mkdir -p /home/steam/.steam \
&& mkdir -p /home/steam/enshrouded \
&& mkdir -p /home/steam/enshrouded/savegame \
&& mkdir -p /home/steam/enshrouded/logs \
&& chown -R steam:steam /home/steam
# --------------------------
# Add Entrypoint Script
# --------------------------
ADD ./entrypoint.sh /home/steam/entrypoint.sh
RUN chmod +x /home/steam/entrypoint.sh
# --------------------------
# Prepare SteamCMD Environment
# --------------------------
USER steam
RUN /home/steam/steamcmd +quit
WORKDIR /home/steam
# --------------------------
# Runtime user (required for PUID/PGID mapping)
# --------------------------
USER root
# --------------------------
# Volume and Port Configuration
# --------------------------
VOLUME /home/steam/enshrouded
EXPOSE 15637/udp
# --------------------------
# Default Entrypoint
# --------------------------
ENTRYPOINT [ "/usr/bin/tini", "--", "/home/steam/entrypoint.sh" ]