ci(ut): add dockerfile

This commit is contained in:
2025-05-01 14:59:26 +02:00
parent 6e64116ee2
commit 8f5aebeea0
3 changed files with 31 additions and 0 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
.git/
Dockerfile
.dockerignore

23
Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM debian:stable-slim AS build
# libxml2-utils is needed for xmllint needed by UrTUpdater_Ded.sh
RUN apt-get update -y && apt-get install -y libxml2-utils curl
WORKDIR /ut/
ADD updater-cfg ./
RUN curl -sSLO 'https://raw.githubusercontent.com/FrozenSand/UrTUpdater/master/ded/UrTUpdater_Ded.sh'
RUN bash ./UrTUpdater_Ded.sh -q
FROM scratch
COPY --from=build /ut/ /ut/
# unfortunately, ioqauke binaries are not statically linked
COPY --from=build /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/
COPY --from=build /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/
COPY --from=build /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/
COPY --from=build /lib64/ld-linux-x86-64.so.2 /lib64/
WORKDIR /ut/
ENTRYPOINT ["./Quake3-UrT-Ded.x86_64"]
EXPOSE 27960:27960/udp

4
updater-cfg Normal file
View File

@ -0,0 +1,4 @@
CURRENTVERSION=${CURRENTVERSION:-1}
DOWNLOADSERVER=${DOWNLOADSERVER:-2}
GAMEENGINE=${GAMEENGINE:-1}
ASKBEFOREUPDATING=${ASKBEFOREUPDATING:-1}