-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tf2-tftrue): build TFTrue in a Docker stage (#28)
- Loading branch information
1 parent
69aa395
commit 4886d4f
Showing
2 changed files
with
19 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
FROM debian:latest AS tftrue-build | ||
WORKDIR /build | ||
|
||
ARG TFTRUE_REPOSITORY_URL=https://github.com/AnAkkk/TFTrue.git | ||
ARG TFTRUE_COMMIT=f5d866fcd5e6d27992b888919484a7b1a3f24454 | ||
|
||
RUN apt-get -y update \ | ||
&& apt-get install -y build-essential git cmake gcc-multilib g++-multilib \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& git clone --recurse-submodules ${TFTRUE_REPOSITORY_URL} tftrue \ | ||
&& cd tftrue \ | ||
&& git checkout ${TFTRUE_COMMIT} \ | ||
&& mkdir build \ | ||
&& cd build \ | ||
&& env CXXFLAGS="-DNO_AUTOUPDATE" cmake .. -DCMAKE_BUILD_TYPE=Release \ | ||
&& make | ||
|
||
|
||
FROM melkortf/tf2-sourcemod:latest | ||
LABEL maintainer="[email protected]" | ||
|
||
ARG TFTRUE_URL=https://github.com/AnAkkk/TFTrue/raw/1867de3cf3dd77afdef6ee4c3929f6e94772cb35/release/TFTrue.so | ||
|
||
COPY TFTrue.vdf "${SERVER_DIR}/tf/addons/TFTrue.vdf" | ||
COPY checksum.md5 . | ||
RUN wget -nv "${TFTRUE_URL}" -O TFTrue.so \ | ||
&& md5sum -c checksum.md5 \ | ||
&& mv TFTrue.so "${SERVER_DIR}/tf/addons/TFTrue.so" \ | ||
&& rm checksum.md5 | ||
COPY --from=tftrue-build /build/tftrue/build/TFTrue.so ${SERVER_DIR}/tf/addons/TFTrue.so | ||
|
||
CMD ["+sv_pure", "2", "+map", "cp_badlands", "+maxplayers", "24"] | ||
|
||
|
This file was deleted.
Oops, something went wrong.