Adapt containerization to urban terror

This commit is contained in:
2025-05-06 23:23:56 +02:00
parent dd2c9160aa
commit 6a7195e6da
2 changed files with 18 additions and 10 deletions

View File

@ -1,4 +1,4 @@
FROM golang:1.13 as builder
FROM golang:1.13 AS builder
WORKDIR /workspace
COPY go.mod go.mod
@ -14,17 +14,21 @@ COPY public public/
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on taskset -c 1 /usr/local/go/bin/go build -a -o q3 ./cmd/q3
FROM alpine:3.12 as quake-n-bake
RUN apk add --no-cache git gcc make libc-dev
RUN git clone https://github.com/ioquake/ioq3
RUN cd /ioq3 && make BUILD_MISSIONPACK=0 BUILD_BASEGAME=0 BUILD_CLIENT=0 BUILD_SERVER=1 BUILD_GAME_SO=0 BUILD_GAME_QVM=0 BUILD_RENDERER_OPENGL2=0 BUILD_STANDALONE=1
RUN cp /ioq3/build/release-linux-$(uname -m)/ioq3ded.$(uname -m) /usr/local/bin/ioq3ded
FROM alpine:3 AS urt-download
FROM alpine:3.12
WORKDIR /ut/
RUN apk add --no-cache libxml2-utils=2.13.4-r5 curl=8.12.1-r1 bash=5.2.37-r0
COPY updater-cfg ./
RUN curl -sSLO 'https://raw.githubusercontent.com/FrozenSand/UrTUpdater/master/ded/UrTUpdater_Ded.sh' && bash ./UrTUpdater_Ded.sh -q
COPY --from=builder /workspace/q3 /usr/local/bin
COPY --from=quake-n-bake /usr/local/bin/ioq3ded /usr/local/bin
COPY --from=quake-n-bake /lib/ld-musl-*.so.1 /lib
FROM alpine:3
RUN apk add --no-cache gcompat=1.1.0-r4
COPY --from=builder /workspace/q3 /usr/local/bin/
COPY --from=urt-download /ut/Quake3-UrT-Ded.x86_64 /usr/local/bin/
COPY --from=urt-download /ut/q3ut4/ /root/.q3a/q3ut4/
# ENTRYPOINT ["/bin/sh"]
ENTRYPOINT ["/usr/local/bin/q3"]

4
updater-cfg Normal file
View File

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