-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
66 lines (58 loc) · 1.94 KB
/
Dockerfile
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
FROM debian:stable-slim
LABEL maintainer="FoRTu" \
maintainet.email="[email protected]" \
maintainer.website="https://github.com/FoRTu/docker-quake2-openffa"
WORKDIR /opt/quake2-openffa-server
ENV Q2_PORT="27910"
ENV Q2_HOSTNAME="Docker Quake2 OpenFFA Server"
ENV Q2_MAXCLIENTS="10"
ENV Q2_ADMIN="admin"
ENV Q2_ADMIN_PASSWORD="AdminPassw0rd"
ENV Q2_RCON_PASSWD="Rc0nPassw0rd"
ENV Q2_ADMIN_EMAIL="[email protected]"
ENV Q2_ADMIN_WEBPAGE="https://example.com"
ENV Q2_MOTD="[=======================]\n\nQuake 2 OpenFFA Server\n(Docker Container)\n\nType 'menu' on console\n\n[=======================]"
ENV Q2_TIMELIMIT="30"
ENV Q2_FRAGLIMIT="25"
ENV Q2_IDLETIME="30"
# Install Updates + Quake2 & OpenFFA MOD:
RUN apt update && \
apt upgrade -y && \
apt -y install wget && \
wget "https://files.fortu.io/quake2-openffa-server_8012-fdf5db3_amd64.deb" && \
dpkg -i quake2-openffa-server_8012-fdf5db3_amd64.deb && \
rm quake2-openffa-server_8012-fdf5db3_amd64.deb && \
apt purge -y wget && \
apt-get -y autoclean && \
apt-get -y autoremove && \
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/share/locale/* \
/var/cache/debconf/*-old \
/var/lib/apt/lists/* \
/usr/share/doc/*
# Add server configuration file
COPY AddFiles/server.cfg /opt/quake2-openffa-server/openffa/
# Define the user
RUN groupadd -g 999 appuser && \
useradd -r -u 999 -g appuser appuser
USER appuser
EXPOSE 27910/tcp
EXPOSE 27910/udp
# Command to run on container startup
CMD /opt/quake2-openffa-server/r1q2ded +set game openffa \
+set port "$Q2_PORT" \
+set hostname "$Q2_HOSTNAME" \
+set maxclients "$Q2_MAXCLIENTS" \
+set ServerAdmin "$Q2_ADMIN" \
+set g_admin_password "$Q2_ADMIN_PASSWORD" \
+set rcon_password "$Q2_RCON_PASSWD" \
+set email "$Q2_ADMIN_EMAIL" \
+set webpage "$Q2_ADMIN_WEBPAGE" \
+set g_motd_message "$Q2_MOTD" \
+set timelimit "$Q2_TIMELIMIT" \
+set fraglimit "$Q2_FRAGLIMIT" \
+set g_idle_time "$Q2_IDLETIME" \
+exec ./server.cfg