FROM debian:bookworm-slim AS builder RUN apt-get update && apt-get install -y --no-install-recommends \ git build-essential cmake curl ca-certificates \ && rm -rf /var/lib/apt/lists/* WORKDIR /build RUN git clone --depth 1 https://github.com/ioquake/ioq3.git . RUN cmake -S . -B build \ -DBUILD_CLIENT=OFF \ -DBUILD_SERVER=ON \ -DCMAKE_BUILD_TYPE=Release \ -DUSE_SDL2=OFF RUN cmake --build build --target ioq3ded -j$(nproc) RUN strip build/Release/ioq3ded FROM debian:bookworm-slim RUN apt-get update && apt-get install -y --no-install-recommends \ libstdc++6 libgcc-s1 \ && rm -rf /var/lib/apt/lists/* \ && useradd -m quake WORKDIR /q3 COPY --from=builder /build/build/Release/ioq3ded /q3/ioq3ded COPY entrypoint.sh /q3/entrypoint.sh RUN chmod 755 /q3/entrypoint.sh /q3/ioq3ded \ && chown quake:quake /q3/entrypoint.sh /q3/ioq3ded USER quake EXPOSE 27960/udp HEALTHCHECK CMD pgrep ioq3ded || exit 1