From 8f5aebeea0fdd90df87ab473342590c4407f0866 Mon Sep 17 00:00:00 2001 From: bp99 Date: Thu, 1 May 2025 14:59:26 +0200 Subject: [PATCH] ci(ut): add dockerfile --- .dockerignore | 4 ++++ Dockerfile | 23 +++++++++++++++++++++++ updater-cfg | 4 ++++ 3 files changed, 31 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 updater-cfg diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..79e6bd0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git/ + +Dockerfile +.dockerignore diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..35559e0 --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/updater-cfg b/updater-cfg new file mode 100644 index 0000000..221e58a --- /dev/null +++ b/updater-cfg @@ -0,0 +1,4 @@ +CURRENTVERSION=${CURRENTVERSION:-1} +DOWNLOADSERVER=${DOWNLOADSERVER:-2} +GAMEENGINE=${GAMEENGINE:-1} +ASKBEFOREUPDATING=${ASKBEFOREUPDATING:-1}