aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..4fb0027
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,41 @@
1FROM debian:bookworm-slim AS builder
2
3RUN apt-get update && apt-get install -y --no-install-recommends \
4 git build-essential cmake curl ca-certificates \
5 && rm -rf /var/lib/apt/lists/*
6
7WORKDIR /build
8
9RUN git clone --depth 1 https://github.com/ioquake/ioq3.git .
10
11RUN cmake -S . -B build \
12 -DBUILD_CLIENT=OFF \
13 -DBUILD_SERVER=ON \
14 -DCMAKE_BUILD_TYPE=Release \
15 -DUSE_SDL2=OFF
16
17RUN cmake --build build --target ioq3ded -j$(nproc)
18RUN strip build/Release/ioq3ded
19
20
21FROM debian:bookworm-slim
22
23RUN apt-get update && apt-get install -y --no-install-recommends \
24 libstdc++6 libgcc-s1 \
25 && rm -rf /var/lib/apt/lists/* \
26 && useradd -m quake
27
28WORKDIR /q3
29
30COPY --from=builder /build/build/Release/ioq3ded /q3/ioq3ded
31
32COPY entrypoint.sh /q3/entrypoint.sh
33
34RUN chmod 755 /q3/entrypoint.sh /q3/ioq3ded \
35 && chown quake:quake /q3/entrypoint.sh /q3/ioq3ded
36
37USER quake
38
39EXPOSE 27960/udp
40
41HEALTHCHECK CMD pgrep ioq3ded || exit 1