mirror of
https://github.com/mr-vercetti/docker-blackmesa-coop-server.git
synced 2025-01-18 05:35:33 +01:00
Initial commit
This commit is contained in:
commit
d2873874d6
55
Dockerfile
Normal file
55
Dockerfile
Normal file
@ -0,0 +1,55 @@
|
||||
FROM mrvercetti/steamcmd as builder
|
||||
|
||||
# Download Black Mesa via SteamCMD
|
||||
RUN ${STEAMCMD_DIR}/steamcmd.sh +login anonymous +force_install_dir ${OUTPUT_DIR} +app_update 346680 validate +quit
|
||||
|
||||
# Fresh start
|
||||
FROM debian:stable-slim
|
||||
LABEL maintainer="mr-vercetti"
|
||||
|
||||
RUN dpkg --add-architecture i386 && \
|
||||
apt-get update && apt-get install -y \
|
||||
ca-certificates lib32gcc-s1 libtinfo5:i386 libstdc++6:i386 locales locales-all tmux unzip && \
|
||||
apt-get clean && \
|
||||
echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \
|
||||
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
|
||||
|
||||
# General variables
|
||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8
|
||||
ENV SERVER_DIR="/blackmesa-server"
|
||||
ENV OUTPUT_DIR="/output"
|
||||
# Startup variables
|
||||
ENV GAME_PARAMS="+map bm_c0a0a +mp_teamplay 1 +maxplayers 2 -port 27015 -console -debug;"
|
||||
|
||||
# Set up Enviornment
|
||||
RUN useradd --home ${SERVER_DIR} --gid root --system abc && \
|
||||
mkdir -p ${SERVER_DIR} && \
|
||||
chown -R abc:root ${SERVER_DIR}
|
||||
|
||||
USER abc
|
||||
|
||||
# Link steamclient.so to prevent srcds_run errors
|
||||
RUN mkdir -p ${SERVER_DIR}/.steam/sdk32 && \
|
||||
ln -s ${SERVER_DIR}/bin/steamclient.so ${SERVER_DIR}/.steam/sdk32/steamclient.so
|
||||
|
||||
# Copy files
|
||||
COPY --chown=abc:root --from=builder ${OUTPUT_DIR} ${SERVER_DIR}
|
||||
COPY --chown=abc:root --chmod=755 /scripts/start.sh /
|
||||
|
||||
# Download and extract mods
|
||||
WORKDIR ${SERVER_DIR}/bms
|
||||
|
||||
ADD --chown=abc:root --chmod=774 https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6936-linux.tar.gz .
|
||||
ADD --chown=abc:root --chmod=774 https://mms.alliedmods.net/mmsdrop/1.11/mmsource-1.11.0-git1148-linux.tar.gz .
|
||||
ADD --chown=abc:root --chmod=774 https://github.com/ampreeT/SourceCoop/releases/download/v1.2/sourcecoop-1.2.zip .
|
||||
|
||||
RUN tar -xf sourcemod-1.11.0-git6936-linux.tar.gz && \
|
||||
tar -xf mmsource-1.11.0-git1148-linux.tar.gz && \
|
||||
unzip sourcecoop-1.2.zip && \
|
||||
rm -f sourcemod-1.11.0-git6936-linux.tar.gz mmsource-1.11.0-git1148-linux.tar.gz sourcecoop-1.2.zip
|
||||
|
||||
WORKDIR ${SERVER_DIR}
|
||||
|
||||
ONBUILD USER root
|
||||
|
||||
ENTRYPOINT ["/start.sh"]
|
24
LICENSE
Normal file
24
LICENSE
Normal file
@ -0,0 +1,24 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <https://unlicense.org>
|
3
scripts/start.sh
Executable file
3
scripts/start.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
cd ${SERVER_DIR}
|
||||
${SERVER_DIR}/srcds_run -game bms ${GAME_PARAMS}
|
Loading…
Reference in New Issue
Block a user