1 Commits

Author SHA1 Message Date
Quinten
ea76034350 steamcmd_debian: add libatomic1 libxi6 for the truck-sim eggs 2024-05-15 10:35:48 +02:00
43 changed files with 108 additions and 669 deletions

View File

@@ -22,7 +22,6 @@ jobs:
- 6
- 7
- 8
- 9
steps:
- uses: actions/checkout@v4
# Setup QEMU for ARM64 Build

View File

@@ -20,7 +20,6 @@ jobs:
- arma3
- dayz
- mohaa
- rust
- samp
- source
- valheim

View File

@@ -25,7 +25,6 @@ jobs:
- '1.20'
- '1.21'
- '1.22'
- '1.23'
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3

View File

@@ -24,8 +24,6 @@ jobs:
- 19
- 20
- 21
- 22
- 23
steps:
- uses: actions/checkout@v4
# Setup QEMU for ARM64 Build

View File

@@ -23,7 +23,6 @@ jobs:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
steps:
- uses: actions/checkout@v4
# Setup QEMU for ARM64 Build

View File

@@ -97,8 +97,6 @@ is tagged correctly.
* `ghcr.io/parkervcp/yolks:dotnet_7`
* [`dotnet8.0`](/dotnet/8)
* `ghcr.io/parkervcp/yolks:dotnet_8`
* [`dotnet9.0`](/dotnet/9)
* `ghcr.io/parkervcp/yolks:dotnet_9`
### [Elixir](/elixir)
@@ -133,11 +131,9 @@ is tagged correctly.
* [`minetest`](/games/minetest)
* `ghcr.io/parkervcp/games:minetest`
* [`mohaa`](games/mohaa)
* `ghcr.io/parkervcp/games:mohaa`
* `ghcr.io/pterodactyl/games:mohaa`
* [`Multi Theft Auto: San Andreas`](games/mta)
* `ghcr.io/parkervcp/games:mta`
* [`Rust (dedicated server)`](games/rust)
* `ghcr.io/parkervcp/games:rust`
* `ghcr.io/pterodactyl/games:mta`
* [`samp`](/games/samp)
* `ghcr.io/parkervcp/games:samp`
* [`source`](/games/source)
@@ -167,8 +163,6 @@ is tagged correctly.
* `ghcr.io/parkervcp/yolks:go_1.21`
* [`go1.22`](/go/1.22)
* `ghcr.io/parkervcp/yolks:go_1.22`
* [`go1.23`](/go/1.23)
* `ghcr.io/parkervcp/yolks:go_1.23`
### [Java](/java)
@@ -238,11 +232,7 @@ is tagged correctly.
* `ghcr.io/parkervcp/yolks:nodejs_20`
* [`node21`](/nodejs/21)
* `ghcr.io/parkervcp/yolks:nodejs_21`
* [`node22`](/nodejs/22)
* `ghcr.io/parkervcp/yolks:nodejs_22`
* [`node23`](/nodejs/23)
* `ghcr.io/parkervcp/yolks:nodejs_23`
### [PostgreSQL](/postgres)
* [`Postgres 9`](/postgres/9)
@@ -272,8 +262,6 @@ is tagged correctly.
* `ghcr.io/parkervcp/yolks:python_3.11`
* [`python3.12`](/python/3.12)
* `ghcr.io/parkervcp/yolks:python_3.12`
* [`python3.13`](/python/3.13)
* `ghcr.io/parkervcp/yolks:python_3.13`
### [Redis](/redis)

View File

@@ -29,10 +29,10 @@ fi
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
# variable format of "${VARIABLE}" before evaluating the string and automatically
# replacing the values.
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")
# Display the command we're running in the output, and then execute it with eval
printf "\033[1m\033[33mcontainer@pelican~ \033[0m"
echo "$PARSED"
# Display the command we're running in the output, and then execute it with the env
# from the container itself.
printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED"
# shellcheck disable=SC2086
eval "$PARSED"
exec env ${PARSED}

View File

@@ -1,25 +0,0 @@
FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/parkervcp/yolks:debian
LABEL author="Torsten Widmann" maintainer="info@goover.de"
ENV DEBIAN_FRONTEND noninteractive
RUN apt update -y \
&& apt upgrade -y \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \
&& wget https://dot.net/v1/dotnet-install.sh \
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '<h3 id="sdk-9.*">SDK 9.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh -i /usr/share -v $D_V \
&& ln -s /usr/share/dotnet /usr/bin/dotnet
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"]

View File

@@ -16,10 +16,10 @@ erl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 'i
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
# variable format of "${VARIABLE}" before evaluating the string and automatically
# replacing the values.
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")
# Display the command we're running in the output, and then execute it with eval
printf "\033[1m\033[33mcontainer@pelican~ \033[0m"
echo "$PARSED"
# Display the command we're running in the output, and then execute it with the env
# from the container itself.
printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED"
# shellcheck disable=SC2086
eval "$PARSED"
exec env ${PARSED}

View File

@@ -18,7 +18,7 @@ RUN apt update -y \
RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& apt update -y \
&& apt install -y dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 libgdiplus
&& apt install -y dotnet-sdk-6.0 dotnet-sdk-7.0 libgdiplus
RUN update-locale lang=en_US.UTF-8 \
&& dpkg-reconfigure --frontend noninteractive locales
@@ -32,4 +32,4 @@ STOPSIGNAL SIGINT
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]
CMD ["/entrypoint.sh"]

View File

@@ -1,6 +1,6 @@
FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim
LABEL author="David Wolfe (Red-Thirten)" maintainer="red_thirten@yahoo.com"
LABEL author="David Wolfe (Red-Thirten)" maintainer="rehlmgaming@gmail.com"
LABEL org.opencontainers.image.source="https://github.com/parkervcp/yolks"
LABEL org.opencontainers.image.licenses=MIT

View File

@@ -54,9 +54,8 @@ function RunSteamCMD { #[Input: int server=0 mod=1 optional_mod=2; int id]
# Error checking for SteamCMD
steamcmdExitCode=${PIPESTATUS[0]}
# Catch errors (ignore setlocale, SDL, steamservice, thread priority, and libcurl warnings)
loggedErrors=$(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|steamservice\|thread\|libcurl")
if [[ -n ${loggedErrors} ]]; then
loggedErrors=$(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|steamservice\|thread")
if [[ -n ${loggedErrors} ]]; then # Catch errors (ignore setlocale, SDL, steamservice, and thread priority warnings)
# Soft errors
if [[ -n $(grep -i "Timeout downloading item" "${STEAMCMD_LOG}") ]]; then # Mod download timeout
echo -e "\n${YELLOW}[UPDATE]: ${NC}Timeout downloading Steam Workshop mod: \"${CYAN}${modName}${NC}\" (${CYAN}${2}${NC})"
@@ -347,12 +346,6 @@ if [[ ${MODS_LOWERCASE} == "1" ]]; then
done
fi
# Define the log file path with a timestamp
LOG_FILE="/home/container/serverprofile/rpt/arma3server_$(date '+%m_%d_%Y_%H%M%S').rpt"
# Ensure the logs directory exists
mkdir -p /home/container/serverprofile/rpt
# Clear HC cache, if specified
if [[ ${CLEAR_CACHE} == "1" ]]; then
echo -e "\n${GREEN}[STARTUP]: ${CYAN}Clearing Headless Client profiles cache...${NC}"
@@ -402,11 +395,7 @@ fi
# Start the Server
echo -e "\n${GREEN}[STARTUP]:${NC} Starting server with the following startup command:"
echo -e "${CYAN}${modifiedStartup}${NC}\n"
if [[ "$STARTUP_PARAMS" == *"-noLogs"* ]]; then
${modifiedStartup}
else
${modifiedStartup} 2>&1 | tee -a "$LOG_FILE"
fi
${modifiedStartup}
if [ $? -ne 0 ]; then
echo -e "\n${RED}PTDL_CONTAINER_ERR: There was an error while attempting to run the start command.${NC}\n"

View File

@@ -1,8 +1,8 @@
FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim
FROM --platform=$BUILDPLATFORM debian:bullseye-slim
LABEL author="David Wolfe (Red-Thirten)" maintainer="red_thirten@yahoo.com"
LABEL author="David Wolfe (Red-Thirten)" maintainer="rehlmgaming@gmail.com"
LABEL org.opencontainers.image.source="https://github.com/pelican-eggs/yolks"
LABEL org.opencontainers.image.source="https://github.com/parkervcp/yolks"
LABEL org.opencontainers.image.licenses=MIT
## Update base packages and install dependencies
@@ -17,6 +17,7 @@ RUN dpkg --add-architecture i386 \
iproute2 \
gettext-base \
ca-certificates \
numactl \
libssl-dev \
lib32gcc-s1 \
libsdl2-2.0-0 \
@@ -28,17 +29,11 @@ RUN dpkg --add-architecture i386 \
libnss-wrapper \
tini
## install rcon client (bercon)
RUN cd /tmp/ \
&& curl -sSL https://github.com/WoozyMasta/bercon/releases/download/1.0.0/bercon > bercon \
&& mv bercon /usr/local/bin/ \
&& chmod +x /usr/local/bin/bercon
## Configure locale
RUN update-locale lang=en_US.UTF-8 \
&& dpkg-reconfigure --frontend noninteractive locales
## Prepare NSS Wrapper for the entrypoint as a workaround for DayZ requiring a valid UID
## Prepare NSS Wrapper for the entrypoint as a workaround for Arma 3 requiring a valid UID
ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group
RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \
&& chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \
@@ -51,10 +46,9 @@ USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
STOPSIGNAL SIGINT
STOPSIGNAL SIGINT
## Copy over and execute entrypoint.sh via Tini
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]

View File

@@ -1,16 +1,15 @@
#!/bin/bash
## File: DayZ Image - entrypoint.sh
## File: Pterodactyl DayZ SA Image - entrypoint.sh
## Author: David Wolfe (Red-Thirten)
## Contributors: Aussie Server Hosts (https://aussieserverhosts.com/)
## Date: 2024/06/05
## Date: 2022/11/27
## License: MIT License
## === CONSTANTS ===
STEAMCMD_DIR="./steamcmd" # SteamCMD's directory containing steamcmd.sh
WORKSHOP_DIR="./Steam/steamapps/workshop" # SteamCMD's directory containing workshop downloads
STEAMCMD_LOG="${STEAMCMD_DIR}/steamcmd.log" # Log file for SteamCMD
GAME_ID=221100 # SteamCMD ID for the DayZ GAME (not server). Only used for Workshop mod downloads.
GAME_ID=221100 # SteamCMD ID for the DayZ SA GAME (not server). Only used for Workshop mod downloads.
# Color Codes
CYAN='\033[0;36m'
@@ -46,16 +45,14 @@ function RunSteamCMD { #[Input: int server=0 mod=1; int id]
# Check if updating server or mod
if [[ $1 == 0 ]]; then # Server
${STEAMCMD_DIR}/steamcmd.sh +force_install_dir /home/container "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +app_update $2 $extraFlags $validateServer +quit | tee -a "${STEAMCMD_LOG}"
numactl --physcpubind=+0 ${STEAMCMD_DIR}/steamcmd.sh +force_install_dir /home/container "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +app_update $2 $extraFlags $validateServer +quit | tee -a "${STEAMCMD_LOG}"
else # Mod
${STEAMCMD_DIR}/steamcmd.sh "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +workshop_download_item $GAME_ID $2 +quit | tee -a "${STEAMCMD_LOG}"
numactl --physcpubind=+0 ${STEAMCMD_DIR}/steamcmd.sh "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +workshop_download_item $GAME_ID $2 +quit | tee -a "${STEAMCMD_LOG}"
fi
# Error checking for SteamCMD
steamcmdExitCode=${PIPESTATUS[0]}
# Catch errors (ignore setlocale, SDL, steamservice, thread priority, and libcurl warnings)
loggedErrors=$(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|steamservice\|thread\|libcurl")
if [[ -n ${loggedErrors} ]]; then
if [[ -n $(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|thread") ]]; then # Catch errors (ignore setlocale, SDL, and thread priority warnings)
# Soft errors
if [[ -n $(grep -i "Timeout downloading item" "${STEAMCMD_LOG}") ]]; then # Mod download timeout
echo -e "\n${YELLOW}[UPDATE]: ${NC}Timeout downloading Steam Workshop mod: \"${CYAN}${modName}${NC}\" (${CYAN}${2}${NC})"
@@ -107,8 +104,8 @@ function RunSteamCMD { #[Input: int server=0 mod=1; int id]
# Move the downloaded mod to the root directory, and replace existing mod if needed
mkdir -p ./@$2
rm -rf ./@$2/*
mv -f ${WORKSHOP_DIR}/content/$GAME_ID/$2/* ./@$2
rm -d ${WORKSHOP_DIR}/content/$GAME_ID/$2
mv -f ./Steam/steamapps/workshop/content/$GAME_ID/$2/* ./@$2
rm -d ./Steam/steamapps/workshop/content/$GAME_ID/$2
# Make the mods contents all lowercase
ModsLowercase @$2
# Move any .bikey's to the keys directory
@@ -241,11 +238,6 @@ if [[ ${UPDATE_SERVER} == 1 ]]; then
if [[ -n $latestUpdate ]] && [[ $latestUpdate =~ ^[0-9]+$ ]]; then # Notify last update date, if valid
echo -e "\tMod was last updated: ${CYAN}$(date -d @${latestUpdate})${NC}"
fi
# Delete SteamCMD appworkshop cache before running to avoid mod download failures
echo -e "\tClearing SteamCMD appworkshop cache..."
rm -f ${WORKSHOP_DIR}/appworkshop_$GAME_ID.acf
echo -e "\tAttempting mod update/download via SteamCMD...\n"
RunSteamCMD 1 $modID
fi
@@ -288,6 +280,6 @@ echo -e "${CYAN}${modifiedStartup}${NC}\n"
${modifiedStartup}
if [ $? -ne 0 ]; then
echo -e "\n${RED}[STARTUP_ERR]: There was an error while attempting to run the start command.${NC}\n"
echo -e "\n${RED}PTDL_CONTAINER_ERR: There was an error while attempting to run the start command.${NC}\n"
exit 1
fi

View File

@@ -1,21 +0,0 @@
FROM --platform=$TARGETOS/$TARGETARCH node:18-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386 \
&& apt update \
&& apt upgrade -y \
&& apt install -y lib32gcc-s1 lib32stdc++6 unzip curl iproute2 tzdata libgdiplus libsdl2-2.0-0:i386 \
&& mkdir /wrapper \
&& npm install --prefix /wrapper ws \
&& useradd -d /home/container -m container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh
COPY ./wrapper.js /wrapper/wrapper.js
CMD [ "/bin/bash", "/entrypoint.sh" ]

View File

@@ -1,48 +0,0 @@
#!/bin/bash
cd /home/container
# Make internal Docker IP address available to processes.
export INTERNAL_IP=`ip route get 1 | awk '{print $(NF-2);exit}'`
## if auto_update is not set or to 1 update
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
# Allow for the staging branch to also update itself
./steamcmd/steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 258550 $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) +quit
else
echo -e "Not updating game server as auto update was set to 0. Starting Server"
fi
# Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":/home/container$ ${MODIFIED_STARTUP}"
if [[ "${FRAMEWORK}" == "carbon" ]]; then
# Carbon: https://github.com/CarbonCommunity/Carbon
echo "Updating Carbon..."
curl -sSL "https://github.com/CarbonCommunity/Carbon/releases/download/production_build/Carbon.Linux.Release.tar.gz" | tar zx
echo "Done updating Carbon!"
export DOORSTOP_ENABLED=1
export DOORSTOP_TARGET_ASSEMBLY="$(pwd)/carbon/managed/Carbon.Preloader.dll"
MODIFIED_STARTUP="LD_PRELOAD=$(pwd)/libdoorstop.so ${MODIFIED_STARTUP}"
elif [[ "${FRAMEWORK}" == "oxide-staging" ]]; then
echo "updating oxide-staging"
curl -sSL -o oxide-staging.zip "https://downloads.oxidemod.com/artifacts/Oxide.Rust/staging/Oxide.Rust-linux.zip"
unzip -o -q oxide-staging.zip
rm oxide-staging.zip
echo "Done updating oxide Staging"
elif [[ "$OXIDE" == "1" ]] || [[ "${FRAMEWORK}" == "oxide" ]]; then
# Oxide: https://github.com/OxideMod/Oxide.Rust
echo "Updating uMod..."
curl -sSL "https://github.com/OxideMod/Oxide.Rust/releases/latest/download/Oxide.Rust-linux.zip" > umod.zip
unzip -o -q umod.zip
rm umod.zip
echo "Done updating uMod!"
# else Vanilla, do nothing
fi
# Fix for Rust not starting
export LD_LIBRARY_PATH=$(pwd)/RustDedicated_Data/Plugins/x86_64:$(pwd)
# Run the Server
/wrapper/wrapper.js "${MODIFIED_STARTUP}"

View File

@@ -1,140 +0,0 @@
#!/usr/bin/env node
var startupCmd = "";
const fs = require("fs");
fs.writeFile("latest.log", "", (err) => {
if (err) console.log("Callback error in appendFile:" + err);
});
var args = process.argv.splice(process.execArgv.length + 2);
for (var i = 0; i < args.length; i++) {
if (i === args.length - 1) {
startupCmd += args[i];
} else {
startupCmd += args[i] + " ";
}
}
if (startupCmd.length < 1) {
console.log("Error: Please specify a startup command.");
process.exit();
}
const seenPercentage = {};
function filter(data) {
const str = data.toString();
if (str.startsWith("Loading Prefab Bundle ")) { // Rust seems to spam the same percentage, so filter out any duplicates.
const percentage = str.substr("Loading Prefab Bundle ".length);
if (seenPercentage[percentage]) return;
seenPercentage[percentage] = true;
}
console.log(str);
}
var exec = require("child_process").exec;
console.log("Starting Rust...");
var exited = false;
const gameProcess = exec(startupCmd);
gameProcess.stdout.on('data', filter);
gameProcess.stderr.on('data', filter);
gameProcess.on('exit', function (code, signal) {
exited = true;
if (code) {
console.log("Main game process exited with code " + code);
// process.exit(code);
}
});
function initialListener(data) {
const command = data.toString().trim();
if (command === 'quit') {
gameProcess.kill('SIGTERM');
} else {
console.log('Unable to run "' + command + '" due to RCON not being connected yet.');
}
}
process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on('data', initialListener);
process.on('exit', function (code) {
if (exited) return;
console.log("Received request to stop the process, stopping the game...");
gameProcess.kill('SIGTERM');
});
var waiting = true;
var poll = function () {
function createPacket(command) {
var packet = {
Identifier: -1,
Message: command,
Name: "WebRcon"
};
return JSON.stringify(packet);
}
var serverHostname = process.env.RCON_IP ? process.env.RCON_IP : "localhost";
var serverPort = process.env.RCON_PORT;
var serverPassword = process.env.RCON_PASS;
var WebSocket = require("ws");
var ws = new WebSocket("ws://" + serverHostname + ":" + serverPort + "/" + serverPassword);
ws.on("open", function open() {
console.log("Connected to RCON. Generating the map now. Please wait until the server status switches to \"Running\".");
waiting = false;
// Hack to fix broken console output
ws.send(createPacket('status'));
process.stdin.removeListener('data', initialListener);
gameProcess.stdout.removeListener('data', filter);
gameProcess.stderr.removeListener('data', filter);
process.stdin.on('data', function (text) {
ws.send(createPacket(text));
});
});
ws.on("message", function (data, flags) {
try {
var json = JSON.parse(data);
if (json !== undefined) {
if (json.Message !== undefined && json.Message.length > 0) {
console.log(json.Message);
const fs = require("fs");
fs.appendFile("latest.log", "\n" + json.Message, (err) => {
if (err) console.log("Callback error in appendFile:" + err);
});
}
} else {
console.log("Error: Invalid JSON received");
}
} catch (e) {
if (e) {
console.log(e);
}
}
});
ws.on("error", function (err) {
waiting = true;
console.log("Waiting for RCON to come up...");
setTimeout(poll, 5000);
});
ws.on("close", function () {
if (!waiting) {
console.log("Connection to server closed.");
exited = true;
process.exit();
}
});
}
poll();

View File

@@ -7,20 +7,14 @@ RUN apt update \
RUN dpkg --add-architecture i386 \
&& apt update \
&& apt upgrade -y \
&& apt install -y libstdc++6 lib32stdc++6 tar wget curl iproute2 openssl fontconfig dirmngr ca-certificates dnsutils tzdata zip tini \
&& apt install -y libstdc++6 lib32stdc++6 tar curl iproute2 openssl fontconfig dirmngr ca-certificates dnsutils tzdata zip tini \
&& apt install -y libtbb12:i386 libtbb-dev:i386 libicu-dev:i386 \
&& useradd -d /home/container -m container
RUN mkdir -p /run/systemd && echo 'docker' > /run/systemd/container
RUN rm -rf /var/lib/apt/lists/*
# Temp fix for things that still need libssl1.1 32 bit
RUN if [ "$(uname -m)" = "x86_64" ]; then \
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_i386.deb && \
dpkg -i libssl1.1_1.1.0g-2ubuntu4_i386.deb && \
rm libssl1.1_1.1.0g-2ubuntu4_i386.deb; \
fi
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

View File

@@ -53,9 +53,9 @@ 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 1007 +app_update ${SRCDS_APPID} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
./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} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || 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 1007 +app_update ${SRCDS_APPID} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
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} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
fi
else
echo -e "No appid set. Starting Server"

View File

@@ -21,7 +21,7 @@ fi
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
# Update Source Server
if [ ! -z ${SRCDS_APPID} ]; 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 1007 +app_update ${SRCDS_APPID} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
./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} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
else
echo -e "No appid set. Starting Server"
fi

View File

@@ -1,12 +0,0 @@
FROM --platform=$TARGETOS/$TARGETARCH golang:1.23-alpine
RUN apk add --update --no-cache ca-certificates tzdata \
&& adduser -D -h /home/container container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./../entrypoint.sh /entrypoint.sh
CMD [ "/bin/ash", "/entrypoint.sh" ]

View File

@@ -40,10 +40,10 @@ go version
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
# variable format of "${VARIABLE}" before evaluating the string and automatically
# replacing the values.
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")
# Display the command we're running in the output, and then execute it with eval
printf "\033[1m\033[33mcontainer@pelican~ \033[0m"
echo "$PARSED"
# Display the command we're running in the output, and then execute it with the env
# from the container itself.
printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED"
# shellcheck disable=SC2086
eval "$PARSED"
exec env ${PARSED}

View File

@@ -40,10 +40,10 @@ java -version
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
# variable format of "${VARIABLE}" before evaluating the string and automatically
# replacing the values.
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")
# Display the command we're running in the output, and then execute it with eval
printf "\033[1m\033[33mcontainer@pelican~ \033[0m"
echo "$PARSED"
# Display the command we're running in the output, and then execute it with the env
# from the container itself.
printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED"
# shellcheck disable=SC2086
eval "$PARSED"
eval ${PARSED}

View File

@@ -8,7 +8,7 @@ LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
ENV DEBIAN_FRONTEND noninteractive
RUN apt update -y \
&& apt install -y netcat-traditional \
&& apt install -y netcat \
&& useradd -d /home/container -m container -s /bin/bash
USER container

View File

@@ -30,9 +30,9 @@ if [ ! -z "${SRCDS_APPID}" ]; 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 1007 +app_update ${SRCDS_APPID} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
./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} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || 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 1007 +app_update ${SRCDS_APPID} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
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} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
fi
else
echo -e "No appid set. Starting Server"

View File

@@ -12,7 +12,7 @@ USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
STOPSIGNAL SIGINT
STOPSIGNAL SIGINT
COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

View File

@@ -12,7 +12,7 @@ USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
STOPSIGNAL SIGINT
STOPSIGNAL SIGINT
COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

View File

@@ -6,12 +6,7 @@ RUN apt update \
&& apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool iputils-ping libnss3 tini \
&& useradd -m -d /home/container container
RUN npm install npm@10.x.x typescript ts-node @types/node --location=global
# install pnpm
RUN npm install -g corepack
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
RUN npm install npm@9.8.1 typescript ts-node @types/node --location=global
USER container
ENV USER=container HOME=/home/container

View File

@@ -8,11 +8,6 @@ RUN apt update \
RUN npm install npm@9.8.1 typescript ts-node @types/node --location=global
# install pnpm
RUN npm install -g corepack
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

View File

@@ -8,11 +8,6 @@ RUN apt update \
RUN npm install npm@latest typescript ts-node @types/node --location=global
# install pnpm
RUN npm install -g corepack
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

View File

@@ -6,12 +6,7 @@ RUN apt update \
&& apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool iputils-ping libnss3 tini \
&& useradd -m -d /home/container container
RUN npm install npm@10.x.x typescript ts-node @types/node --location=global
# install pnpm
RUN npm install -g corepack
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
RUN npm install npm@latest typescript ts-node @types/node --location=global
USER container
ENV USER=container HOME=/home/container

View File

@@ -1,25 +0,0 @@
FROM --platform=$TARGETOS/$TARGETARCH node:22-bookworm-slim
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
RUN apt update \
&& apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool iputils-ping libnss3 tini \
&& useradd -m -d /home/container container
RUN npm install npm@latest typescript ts-node @types/node --location=global
# install pnpm
RUN npm install -g corepack
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
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"]

View File

@@ -1,25 +0,0 @@
FROM --platform=$TARGETOS/$TARGETARCH node:23-bookworm-slim
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
RUN apt update \
&& apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool iputils-ping libnss3 tini \
&& useradd -m -d /home/container container
RUN npm install npm@latest typescript ts-node @types/node --location=global
# install pnpm
RUN npm install -g corepack
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
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"]

View File

@@ -34,11 +34,11 @@ cd /home/container || exit 1
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
# variable format of "${VARIABLE}" before evaluating the string and automatically
# replacing the values.
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")
# Display the command we're running in the output, and then execute it with eval
printf "\033[1m\033[33mcontainer@pelican~ \033[0m"
echo "$PARSED"
# Display the command we're running in the output, and then execute it with the env
# from the container itself.
printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED"
# shellcheck disable=SC2086
eval "$PARSED"
exec env ${PARSED}

View File

@@ -1,35 +1,31 @@
FROM --platform=$TARGETOS/$TARGETARCH ubuntu:24.04
FROM --platform=$TARGETOS/$TARGETARCH ubuntu:22.04
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
LABEL org.opencontainers.image.source="https://github.com/pelican-eggs/yolks"
LABEL org.opencontainers.image.licenses=MIT
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
## add container user
RUN useradd -m -d /home/container -s /bin/bash container
## Add container user
RUN useradd -m -d /home/container -s /bin/bash container
ENV USER=container HOME=/home/container
## update base packages
RUN apt update \
&& apt upgrade -y
## Update base packages
RUN apt update \
&& apt upgrade -y
## install dependencies
RUN apt install -y gcc g++ libgcc1 libc++-dev gdb libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \
libfontconfig icu-devtools libunwind8 sqlite3 libsqlite3-dev libzip4 locales ffmpeg apt-transport-https init-system-helpers \
libcurl3-gnutls liblua5.1-0 libluajit-5.1-2 libsqlite3-0 bzip2 zlib1g libevent-dev libmariadb-dev-compat libmariadb-dev libssl-dev \
libfluidsynth-dev libmariadb-dev libicu-dev libssl3 libduktape207 libjsoncpp-dev libleveldb1d libncurses5 libncursesw5 tini
## Install dependencies
RUN apt install -y gcc g++ libgcc1 libc++-dev gdb libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat-openbsd telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \
libfontconfig icu-devtools libunwind8 sqlite3 libsqlite3-dev libzip4 locales ffmpeg apt-transport-https init-system-helpers \
libcurl3-gnutls liblua5.1-0 libluajit-5.1-2 libsqlite3-0 bzip2 zlib1g libevent-dev libmariadb-dev-compat libmariadb-dev libssl-dev \
libfluidsynth-dev libmariadb-dev libicu-dev libssl3 libduktape207 libjsoncpp-dev libleveldb1d libncurses6 libncursesw6 tini
## configure locale
RUN update-locale lang=en_US.UTF-8 \
&& dpkg-reconfigure --frontend noninteractive locales
## Configure locale
RUN update-locale lang=en_US.UTF-8 \
&& dpkg-reconfigure --frontend noninteractive locales
WORKDIR /home/container
WORKDIR /home/container
STOPSIGNAL SIGINT
STOPSIGNAL SIGINT
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]

View File

@@ -1,18 +0,0 @@
FROM --platform=$TARGETOS/$TARGETARCH python:3.13-slim-bookworm
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
RUN apt update \
&& apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \
&& useradd -m -d /home/container container
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"]

View File

@@ -10,7 +10,7 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y tar curl gcc g++ lib32gcc-s1 libgcc-12-dev libgcc-11-dev libcurl4-gnutls-dev:i386 libssl-dev:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 libsdl2-2.0-0 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat-traditional tzdata numactl xvfb wget tini \
&& apt-get install -y tar curl gcc g++ lib32gcc-s1 libgcc-12-dev libgcc-11-dev libcurl4-gnutls-dev:i386 libssl-dev:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 libsdl2-2.0-0 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat-traditional tzdata numactl xvfb wget tini libatomic1 libxi6 \
&& useradd -m -d /home/container container
## install rcon

View File

@@ -69,9 +69,9 @@ 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 1007 +app_update ${SRCDS_APPID} $( [[ -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
./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} $( [[ -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 1007 +app_update ${SRCDS_APPID} $( [[ -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
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} $( [[ -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"

View File

@@ -1,40 +1,22 @@
FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim AS builder
FROM --platform=$TARGETOS/$TARGETARCH alpine:edge
# Copy and run the build script
COPY build.sh /build.sh
RUN chmod +x /build.sh
RUN cd / && ./build.sh
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim
LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks"
LABEL org.opencontainers.image.licenses=MIT
# Create necessary directories
RUN mkdir -p /usr/local/bin /usr/local/share/mumble
## install dependencies
RUN apk add --no-cache murmur tini
# Copy the built Mumble server binary and the latest tag file and the build log from the builder stage
COPY --from=builder /usr/src/mumble/git/build/mumble-server /usr/local/bin/mumble-server
COPY --from=builder /usr/src/mumble/git/build/latest_tag.txt /usr/local/share/mumble/latest_tag.txt
COPY --from=builder /usr/src/mumble/build.log /usr/local/share/mumble/build.log
RUN adduser -D container
# Install runtime dependencies
RUN apt update \
&& apt -y install curl tar tzdata file ca-certificates sqlite3 iproute2 tini \
&& useradd -m -d /home/container container
# Needed packages to run the mumble server
RUN apt -y install libqt5sql5 libqt5sql5-sqlite libavahi-compat-libdnssd-dev libqt5dbus5 libzeroc-ice-dev libprotobuf-dev qtbase5-dev qtbase5-dev-tools
# Set up user and working directory
USER container
ENV USER=container HOME=/home/container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
# Set the stop signal
STOPSIGNAL SIGINT
# Copy and set up the entrypoint script
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Define entrypoint and command
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/sbin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]

View File

@@ -1,155 +0,0 @@
#!/bin/bash
# Mumble compile script.
# Runs on Debian 12
LOGFILE="/usr/src/mumble/build.log"
log() {
echo "$(date +'%Y-%m-%d %H:%M:%S') - $1" | tee -a $LOGFILE
}
install_dep(){
log "Installing dependencies..."
apt update && apt -y install \
build-essential \
cmake \
pkg-config \
qtbase5-dev \
qtchooser \
qt5-qmake \
qtbase5-dev-tools \
qttools5-dev \
qttools5-dev-tools \
libqt5svg5-dev \
libboost-dev \
libssl-dev \
libprotobuf-dev \
protobuf-compiler \
libprotoc-dev \
libcap-dev \
libxi-dev \
libasound2-dev \
libogg-dev \
libsndfile1-dev \
libspeechd-dev \
libavahi-compat-libdnssd-dev \
libxcb-xinerama0 \
libzeroc-ice-dev \
libpoco-dev \
jq \
python3 \
curl \
git
if [[ $? -ne 0 ]]; then
log "Failed to install dependencies"
exit 1
fi
log "Dependencies installed successfully"
}
# Function to install g++-multilib on amd64
install_amd64_multilib() {
apt -y install g++-multilib
if [[ $? -ne 0 ]]; then
log "Failed to install amd multilib dependency"
exit 1
fi
log "Multilib AMD64 installed successfully"
}
# Function to install multilib support on arm64
install_arm64_multilib() {
apt -y install g++-multilib-x86-64-linux-gnu g++-aarch64-linux-gnu libc6-dev-armhf-cross
if [[ $? -ne 0 ]]; then
log "Failed to install amd multilib dependency"
exit 1
fi
log "Multilib ARM64 installed successfully"
}
clone_mumble(){
log "Cloning the Mumble repository..."
# Create the necessary directories
mkdir -p /usr/src/mumble/git && cd /usr/src/mumble/git
# Fetch the latest release tag from the GitHub API
LATEST_TAG=$(curl -s "https://api.github.com/repos/mumble-voip/mumble/releases/latest" | jq -r .tag_name)
if [[ $? -ne 0 || -z "$LATEST_TAG" ]]; then
log "Failed to fetch the latest release tag"
exit 1
fi
echo "The latest tag is: $LATEST_TAG" | tee -a $LOGFILE
# Clone the repository
echo "Running: git clone --branch \"$LATEST_TAG\" https://github.com/mumble-voip/mumble.git ."
git clone --branch "$LATEST_TAG" https://github.com/mumble-voip/mumble.git .
if [[ $? -ne 0 ]]; then
log "Failed to clone the repository"
exit 1
fi
# Clone the submodules
git submodule update --init --recursive
if [[ $? -ne 0 ]]; then
log "Failed to update submodules"
exit 1
fi
# Create and navigate to the build directory
mkdir -p build && cd build
echo "$LATEST_TAG" > latest_tag.txt
# Run cmake with the specified options
cmake -Dbundled-opus=OFF -Dclient=OFF -Dstatic=ON -DCMAKE_BUILD_TYPE=Release ..
if [[ $? -ne 0 ]]; then
log "CMake configuration failed"
exit 1
fi
log "Repository cloned and configured successfully"
}
build_mumble(){
log "Building Mumble server..."
cd /usr/src/mumble/git/build
echo "Using $(nproc) threads to build Mumble server" | tee -a $LOGFILE
cmake --build . -j $(nproc)
if [[ $? -ne 0 ]]; then
log "Build failed"
exit 1
fi
ls -la | tee -a $LOGFILE
log "Build completed successfully"
}
# Install normal deps
install_dep
# Detect the architecture
ARCH=$(dpkg --print-architecture)
# Install ARCH specific deps
if [ "$ARCH" = "amd64" ]; then
echo "Detected architecture: amd64"
install_amd64_multilib
elif [ "$ARCH" = "arm64" ]; then
echo "Detected architecture: arm64"
install_arm64_multilib
else
echo "Unsupported architecture: $ARCH"
exit 1
fi
clone_mumble
build_mumble

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/ash
cd /home/container
# Make internal Docker IP address available to processes.
@@ -6,12 +6,11 @@ INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
export INTERNAL_IP
# Print the Muble server version
echo -e "Mumble release version:"
cat /usr/local/share/mumble/latest_tag.txt
mumble-server --version
# Replace Startup Variables
MODIFIED_STARTUP=$(echo -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g'))
echo -e ":/home/container$ ${MODIFIED_STARTUP}"
# Run the Server
eval ${MODIFIED_STARTUP}
eval ${MODIFIED_STARTUP}

View File

@@ -15,10 +15,10 @@ echo "installed youtube-dl Version:"
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
# variable format of "${VARIABLE}" before evaluating the string and automatically
# replacing the values.
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")
# Display the command we're running in the output, and then execute it with eval
printf "\033[1m\033[33mcontainer@pelican~ \033[0m"
echo "$PARSED"
# Display the command we're running in the output, and then execute it with the env
# from the container itself.
printf "\033[1m\033[33mcontainer@pelican~ \033[0m%s\n" "$PARSED"
# shellcheck disable=SC2086
eval "$PARSED"
exec env ${PARSED}

View File

@@ -26,9 +26,9 @@ 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 1007 +app_update ${SRCDS_APPID} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
./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} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || 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 1007 +app_update ${SRCDS_APPID} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
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} $( [[ -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}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
fi
else
echo -e "No appid set. Starting Server"