Skip to content
Snippets Groups Projects
Verified Commit 5ba6bacf authored by Mateusz Brawański's avatar Mateusz Brawański
Browse files

Strip output binaries for containers.

parent 7e98bbc7
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ ARG IOQ3DED_VERSION \
TARGETVARIANT
# Install necessary build prerequisites
RUN apk add --no-cache clang18 llvm18 lld musl-dev git make curl \
RUN apk add --no-cache clang18 llvm18 lld musl-dev git make binuils curl \
&& mkdir -p /quake /quake.tmp/quake /quake.tmp/baseq3 /quake.tmp/home
# Set the workdir
......@@ -45,7 +45,13 @@ RUN make \
--fail-with-body \
-H "JOB-TOKEN: ${GL_CI_JOB_TOKEN}" \
-T /quake/build/release/ioq3ded \
"${GL_CI_API_V4_URL}/projects/${GL_CI_PROJECT_ID}/packages/generic/ioq3ded-static/${IOQ3DED_VERSION}/ioq3ded-static-${TARGETARCH}${TARGETVARIANT}"
"${GL_CI_API_V4_URL}/projects/${GL_CI_PROJECT_ID}/packages/generic/ioq3ded-static/${IOQ3DED_VERSION}/ioq3ded-static-${TARGETARCH}${TARGETVARIANT}" \
&& strip --strip-all /quake/build/release/ioq3ded \
&& curl \
--fail-with-body \
-H "JOB-TOKEN: ${GL_CI_JOB_TOKEN}" \
-T /quake/build/release/ioq3ded \
"${GL_CI_API_V4_URL}/projects/${GL_CI_PROJECT_ID}/packages/generic/ioq3ded-static/${IOQ3DED_VERSION}/ioq3ded-static-${TARGETARCH}${TARGETVARIANT}-stripped"
# Build the final container
FROM scratch AS final
......
FROM alpine:3.20.2 AS build
# Install necessary build prerequisites
RUN apk add --no-cache clang18 llvm18 lld musl-dev git make \
RUN apk add --no-cache clang18 llvm18 lld musl-dev git make binuils \
&& mkdir -p /quake /quake.tmp/quake /quake.tmp/baseq3 /quake.tmp/home
# Set the workdir
......@@ -12,27 +12,28 @@ COPY ./ /quake/
# Build the server
RUN make \
-j$(nproc --all) \
CC="clang-18 -static" \
LD="lld -static" \
BUILD_STANDALONE=0 \
BUILD_CLIENT=0 \
BUILD_SERVER=1 \
BUILD_GAME_SO=0 \
BUILD_GAME_QVM=0 \
BUILD_BASEGAME=0 \
BUILD_MISSIONPACK=0 \
BUILD_RENDERER_OPENGL2=0 \
USE_OPENAL=0 \
USE_OPENAL_DLOPEN=0 \
OSE_CURL_DLOPEN=0 \
USE_CODEC_VORBIS=0 \
USE_CODEC_OPUS=0 \
USE_MUMBLE=0 \
USE_VOIP=0 \
USE_RENDERER_DLOPEN=0 \
BR=./build/release \
FULLBINEXT=
-j$(nproc --all) \
CC="clang-18 -static" \
LD="lld -static" \
BUILD_STANDALONE=0 \
BUILD_CLIENT=0 \
BUILD_SERVER=1 \
BUILD_GAME_SO=0 \
BUILD_GAME_QVM=0 \
BUILD_BASEGAME=0 \
BUILD_MISSIONPACK=0 \
BUILD_RENDERER_OPENGL2=0 \
USE_OPENAL=0 \
USE_OPENAL_DLOPEN=0 \
OSE_CURL_DLOPEN=0 \
USE_CODEC_VORBIS=0 \
USE_CODEC_OPUS=0 \
USE_MUMBLE=0 \
USE_VOIP=0 \
USE_RENDERER_DLOPEN=0 \
BR=./build/release \
FULLBINEXT= \
&& strip --strip-all /quake/build/release/ioq3ded
# Build the final container
FROM alpine:3.20.2 AS final
......
......@@ -123,6 +123,9 @@ all supported architecture. These binaries are statically-linked against musl li
binaries are standalone insofar as additional binaries and libraries go. The `.pk3` files required for the server to run
must still be supplied separately.
The binaries come in 2 flavours, stripped and non-stripped. The former have all unnecessary data (such as debugging
information) removed, making the binaries smaller. There is, however, no performance impact to this.
To run the server, create a directory named `baseq3` where the server binary is created, and put your `.pk3` files in
it. Create a folder for the server to store its configuration in, and make sure the user which the server will run as
can write to it (typically you want permissions to be 700 or 755, with owner being the user). To run the server, you
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment