35 lines
No EOL
927 B
Docker
35 lines
No EOL
927 B
Docker
ARG DEBIAN_VERSION=bookworm-slim
|
|
|
|
FROM debian:$DEBIAN_VERSION
|
|
|
|
# Install dependencies for spcomp64 to work, only supports 64-bit for now
|
|
RUN apt update && apt install libstdc++6 -y
|
|
|
|
ARG TAR_FILE
|
|
|
|
# Copy local copy of tar file
|
|
COPY tars/$TAR_FILE /tmp/
|
|
|
|
# Setup dirs
|
|
RUN mkdir /sourcemod && mkdir -p /build/scripting && mkdir /build/plugins
|
|
|
|
# Extract tar file
|
|
RUN tar --strip-components=3 -C /sourcemod -xvf /tmp/$TAR_FILE addons/sourcemod/scripting
|
|
|
|
# override tar's compile.sh with our better one
|
|
COPY compile.sh /sourcemod
|
|
|
|
# Remove all base command files
|
|
RUN rm /sourcemod/*.sp
|
|
|
|
# Remove all folders besides include/
|
|
RUN find /sourcemod -type d -mindepth 1 -prune ! -name "include" -exec rm -r '{}' \;
|
|
|
|
# Remove tmp
|
|
RUN rm /tmp/*
|
|
|
|
ENV PATH="$PATH:/sourcemod"
|
|
|
|
WORKDIR /build
|
|
# ENTRYPOINT ["/sourcemod/spcomp64", "-o","/build/plugins/","-i","/sourcemod/include","-i","/build/include","-D","/build/scripting"]
|
|
CMD ["/bin/sh"] |