This repository was archived by the owner on Jul 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathDockerfile
More file actions
96 lines (85 loc) · 2.22 KB
/
Copy pathDockerfile
File metadata and controls
96 lines (85 loc) · 2.22 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
FROM debian:buster-slim
# Stop apt-get asking to get Dialog frontend
ENV DEBIAN_FRONTEND=noninteractive \
TERM=xterm
# LinuxGSM_ variables
ENV LGSM_VERSION="latest" \
LGSM_GAMESERVER="" \
LGSM_GAMESERVER_UPDATE="true" \
LGSM_GAMESERVER_START="false" \
LGSM_GAMESERVER_RENAME="" \
LGSM_COMMON_CONFIG="" \
LGSM_COMMON_CONFIG_FILE="" \
LGSM_SERVER_CONFIG="" \
LGSM_SERVER_CONFIG_FILE=""
# Fix for JRE installation
RUN mkdir -p /usr/share/man/man1/
# Install dependencies
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install --no-install-recommends -y \
bc \
binutils \
bsdmainutils \
bzip2 \
ca-certificates \
curl \
default-jre \
file \
gzip \
iproute2 \
jq \
lib32gcc1 \
lib32stdc++6 \
libsdl2-2.0-0:i386 \
locales \
mailutils \
netcat \
nodejs \
postfix \
procps \
python \
tar \
tmux \
util-linux \
unzip \
wget && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
rm -rf /var/tmp/*
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get update && \
apt-get install --no-install-recommends -y \
nodejs && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
rm -rf /var/tmp/*
RUN npm set progress=false && \
npm config set depth 0 && \
npm install --no-audit --global gamedig && \
npm cache clean --force
# Set the locale
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
# Add the steam user
RUN adduser \
--disabled-login \
--disabled-password \
--shell /bin/bash \
--gecos "" \
linuxgsm && \
usermod -G tty linuxgsm
COPY ./scripts/*.sh /
RUN chmod +x /*.sh
# Switch to the user steam
USER linuxgsm
WORKDIR /home/linuxgsm
ENTRYPOINT ["/entrypoint.sh"]
HEALTHCHECK --interval=60s --timeout=30s --start-period=300s --retries=3 CMD [ "/lgsm_healthcheck.sh" ]