Add steamcmd ubuntu
This commit is contained in:
parent
e8dec3f984
commit
6d4f157fc5
5 changed files with 111 additions and 3 deletions
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
|
@ -213,6 +213,7 @@ pipeline {
|
|||
docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_proton steamcmd/proton
|
||||
docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_proton8 steamcmd/proton_8
|
||||
docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_sniper steamcmd/sniper
|
||||
docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_ubuntu steamcmd/ubuntu
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
@ -233,6 +234,7 @@ pipeline {
|
|||
docker push git.zontreck.com/ariascreations/yolks:steamcmd_proton
|
||||
docker push git.zontreck.com/ariascreations/yolks:steamcmd_proton8
|
||||
docker push git.zontreck.com/ariascreations/yolks:steamcmd_sniper
|
||||
docker push git.zontreck.com/ariascreations/yolks:steamcmd_ubuntu
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
3
build.sh
3
build.sh
|
@ -35,4 +35,5 @@ docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_debian steamcmd/d
|
|||
docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_dotnet steamcmd/dotnet
|
||||
docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_proton steamcmd/proton
|
||||
docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_proton8 steamcmd/proton_8
|
||||
docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_sniper steamcmd/sniper
|
||||
docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_sniper steamcmd/sniper
|
||||
docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_ubuntu steamcmd/ubuntu
|
|
@ -1,7 +1,7 @@
|
|||
# ---------------------------------------------
|
||||
# Steam Sniper image (RT3)
|
||||
# ---------------------------------------------
|
||||
FROM --platform=$TARGETOS/$TARGETARCH registry.gitlab.steamos.cloud/steamrt/sniper/platform:latest-container-runtime-depot
|
||||
FROM registry.gitlab.steamos.cloud/steamrt/sniper/platform:latest-container-runtime-depot
|
||||
|
||||
|
||||
LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com"
|
||||
|
@ -27,7 +27,7 @@ WORKDIR /home/container
|
|||
|
||||
STOPSIGNAL SIGINT
|
||||
|
||||
COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh
|
||||
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
|
||||
CMD ["/entrypoint.sh"]
|
39
steamcmd/ubuntu/Dockerfile
Normal file
39
steamcmd/ubuntu/Dockerfile
Normal file
|
@ -0,0 +1,39 @@
|
|||
FROM ubuntu:22.04
|
||||
|
||||
|
||||
LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com"
|
||||
LABEL upstream="https://github.com/pelican-eggs/yolks"
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN dpkg --add-architecture i386 \
|
||||
&& apt update \
|
||||
&& apt upgrade -y \
|
||||
&& apt -y install tar curl gcc g++ lib32gcc-s1 libgcc1 libcurl4-gnutls-dev:i386 libssl-dev:i386 libssl-dev libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat tzdata libtinfo6:i386 libtbb2:i386 libtinfo5:i386 libcurl4-gnutls-dev:i386 libcurl4:i386 libncurses5:i386 libcurl3-gnutls:i386 faketime:i386 libtbb2:i386 \
|
||||
&& apt -y install lib32tinfo6 lib32stdc++6 lib32z1 libtbb2 libtinfo5 libstdc++6 readline-common libncursesw5 libfontconfig1 libnss-wrapper gettext-base libc++-dev libc6-i386 libcurl4 libc6 libc6:i386 libssl3 libssl3:i386 libc6 libc6:i386 xvfb gdb libc++-dev tini
|
||||
|
||||
RUN useradd -d /home/container -m container
|
||||
|
||||
## Specific to pavlov_vr
|
||||
RUN rm /usr/lib/x86_64-linux-gnu/libc++.so \
|
||||
&& ln -s /usr/lib/x86_64-linux-gnu/libc++.so.1 /usr/lib/x86_64-linux-gnu/libc++.so
|
||||
|
||||
## install rcon
|
||||
RUN cd /tmp/ \
|
||||
&& curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \
|
||||
&& tar xvf rcon.tar.gz \
|
||||
&& mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container
|
||||
WORKDIR /home/container
|
||||
|
||||
STOPSIGNAL SIGINT
|
||||
|
||||
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
|
||||
CMD ["/entrypoint.sh"]
|
66
steamcmd/ubuntu/entrypoint.sh
Normal file
66
steamcmd/ubuntu/entrypoint.sh
Normal file
|
@ -0,0 +1,66 @@
|
|||
|
||||
# Wait for the container to fully initialize
|
||||
sleep 1
|
||||
|
||||
# Default the TZ environment variable to UTC.
|
||||
TZ=${TZ:-UTC}
|
||||
export TZ
|
||||
|
||||
# Set environment variable that holds the Internal Docker IP
|
||||
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
||||
export INTERNAL_IP
|
||||
|
||||
# Set environment for Steam Proton
|
||||
if [ -f "/usr/local/bin/proton" ]; then
|
||||
if [ ! -z ${SRCDS_APPID} ]; then
|
||||
mkdir -p /home/container/.steam/steam/steamapps/compatdata/${SRCDS_APPID}
|
||||
export STEAM_COMPAT_CLIENT_INSTALL_PATH="/home/container/.steam/steam"
|
||||
export STEAM_COMPAT_DATA_PATH="/home/container/.steam/steam/steamapps/compatdata/${SRCDS_APPID}"
|
||||
# Fix for pipx with protontricks
|
||||
export PATH=$PATH:/root/.local/bin
|
||||
else
|
||||
echo -e "----------------------------------------------------------------------------------"
|
||||
echo -e "WARNING!!! Proton needs variable SRCDS_APPID, else it will not work. Please add it"
|
||||
echo -e "Server stops now"
|
||||
echo -e "----------------------------------------------------------------------------------"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Switch to the container's working directory
|
||||
cd /home/container || exit 1
|
||||
|
||||
## just in case someone removed the defaults.
|
||||
if [ "${STEAM_USER}" == "" ]; then
|
||||
echo -e "steam user is not set.\n"
|
||||
echo -e "Using anonymous user.\n"
|
||||
STEAM_USER=anonymous
|
||||
STEAM_PASS=""
|
||||
STEAM_AUTH=""
|
||||
else
|
||||
echo -e "user set to ${STEAM_USER}"
|
||||
fi
|
||||
|
||||
## if auto_update is not set or to 1 update
|
||||
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
|
||||
# Update Source Server
|
||||
if [ ! -z ${SRCDS_APPID} ]; then
|
||||
if [ "${STEAM_USER}" == "anonymous" ]; then
|
||||
./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} +app_update 1007 $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) ${INSTALL_FLAGS} $( [[ "${VALIDATE}" == "1" ]] && printf %s 'validate' ) +quit
|
||||
else
|
||||
numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} +app_update 1007 $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) ${INSTALL_FLAGS} $( [[ "${VALIDATE}" == "1" ]] && printf %s 'validate' ) +quit
|
||||
fi
|
||||
else
|
||||
echo -e "No appid set. Starting Server"
|
||||
fi
|
||||
|
||||
else
|
||||
echo -e "Not updating game server as auto update was set to 0. Starting Server"
|
||||
fi
|
||||
|
||||
# Replace Startup Variables
|
||||
MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||
echo -e ":/home/container$ ${MODIFIED_STARTUP}"
|
||||
|
||||
# Run the Server
|
||||
eval ${MODIFIED_STARTUP}
|
Loading…
Reference in a new issue