Compare commits
54 Commits
truck-sim
...
rust-carbo
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7715662278 | ||
![]() |
19ce2e09e9 | ||
![]() |
2c20a9df7f | ||
![]() |
9ce202da7c | ||
![]() |
bbc22b5929 | ||
![]() |
946aa2ea82 | ||
![]() |
39b46f44c5 | ||
![]() |
9dfa003141 | ||
![]() |
4fe3c49a62 | ||
![]() |
11c2e05621 | ||
![]() |
f792807176 | ||
![]() |
a13e79fce2 | ||
![]() |
67f65ee12c | ||
![]() |
4384852949 | ||
![]() |
0568f68528 | ||
![]() |
51edfd31b6 | ||
![]() |
d5d2194f6b | ||
![]() |
8331bdfa42 | ||
![]() |
bb8092b592 | ||
![]() |
755085d2d9 | ||
![]() |
68f92a85ab | ||
![]() |
e8a541d1ee | ||
![]() |
a98977b5df | ||
![]() |
bc9645e8bf | ||
![]() |
a42febc72c | ||
![]() |
a84e8296f0 | ||
![]() |
3c35b3e1e1 | ||
![]() |
80fdcf36b6 | ||
![]() |
54fa390139 | ||
![]() |
2f0b10b51d | ||
![]() |
238cfc7ded | ||
![]() |
5e4e0a45a8 | ||
![]() |
7ac950ba0e | ||
![]() |
7b185c1dac | ||
![]() |
4b1c304693 | ||
![]() |
3325914ee8 | ||
![]() |
2dcf0a5058 | ||
![]() |
bfe479fc65 | ||
![]() |
f888177425 | ||
![]() |
681ffc488d | ||
![]() |
efc8507ae1 | ||
![]() |
5035b0d4df | ||
![]() |
727d71a662 | ||
![]() |
716122d3be | ||
![]() |
bd036bff48 | ||
![]() |
80381ec9d8 | ||
![]() |
33eee7766f | ||
![]() |
2e3436f381 | ||
![]() |
5f7b002633 | ||
![]() |
fc6812403a | ||
![]() |
c531bfee27 | ||
![]() |
0e0c76820a | ||
![]() |
5b2e766364 | ||
![]() |
43616ff3f8 |
1
.github/workflows/dotnet.yml
vendored
1
.github/workflows/dotnet.yml
vendored
@@ -22,6 +22,7 @@ jobs:
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# Setup QEMU for ARM64 Build
|
||||
|
1
.github/workflows/games.yml
vendored
1
.github/workflows/games.yml
vendored
@@ -20,6 +20,7 @@ jobs:
|
||||
- arma3
|
||||
- dayz
|
||||
- mohaa
|
||||
- rust
|
||||
- samp
|
||||
- source
|
||||
- valheim
|
||||
|
1
.github/workflows/go.yml
vendored
1
.github/workflows/go.yml
vendored
@@ -25,6 +25,7 @@ jobs:
|
||||
- '1.20'
|
||||
- '1.21'
|
||||
- '1.22'
|
||||
- '1.23'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
2
.github/workflows/nodejs.yml
vendored
2
.github/workflows/nodejs.yml
vendored
@@ -24,6 +24,8 @@ jobs:
|
||||
- 19
|
||||
- 20
|
||||
- 21
|
||||
- 22
|
||||
- 23
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# Setup QEMU for ARM64 Build
|
||||
|
1
.github/workflows/python.yml
vendored
1
.github/workflows/python.yml
vendored
@@ -23,6 +23,7 @@ jobs:
|
||||
- '3.10'
|
||||
- '3.11'
|
||||
- '3.12'
|
||||
- '3.13'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# Setup QEMU for ARM64 Build
|
||||
|
18
README.md
18
README.md
@@ -97,6 +97,8 @@ 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)
|
||||
|
||||
@@ -131,9 +133,11 @@ is tagged correctly.
|
||||
* [`minetest`](/games/minetest)
|
||||
* `ghcr.io/parkervcp/games:minetest`
|
||||
* [`mohaa`](games/mohaa)
|
||||
* `ghcr.io/pterodactyl/games:mohaa`
|
||||
* `ghcr.io/parkervcp/games:mohaa`
|
||||
* [`Multi Theft Auto: San Andreas`](games/mta)
|
||||
* `ghcr.io/pterodactyl/games:mta`
|
||||
* `ghcr.io/parkervcp/games:mta`
|
||||
* [`Rust (dedicated server)`](games/rust)
|
||||
* `ghcr.io/parkervcp/games:rust`
|
||||
* [`samp`](/games/samp)
|
||||
* `ghcr.io/parkervcp/games:samp`
|
||||
* [`source`](/games/source)
|
||||
@@ -163,6 +167,8 @@ 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)
|
||||
|
||||
@@ -232,7 +238,11 @@ 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)
|
||||
@@ -262,6 +272,8 @@ 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)
|
||||
|
||||
|
@@ -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' | eval echo "$(cat -)")
|
||||
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||
|
||||
# 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"
|
||||
# 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"
|
||||
# shellcheck disable=SC2086
|
||||
exec env ${PARSED}
|
||||
eval "$PARSED"
|
||||
|
25
dotnet/9/Dockerfile
Normal file
25
dotnet/9/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
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"]
|
@@ -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' | eval echo "$(cat -)")
|
||||
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||
|
||||
# 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"
|
||||
# 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"
|
||||
# shellcheck disable=SC2086
|
||||
exec env ${PARSED}
|
||||
eval "$PARSED"
|
||||
|
@@ -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 libgdiplus
|
||||
&& apt install -y dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.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"]
|
||||
|
@@ -1,6 +1,6 @@
|
||||
FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim
|
||||
|
||||
LABEL author="David Wolfe (Red-Thirten)" maintainer="rehlmgaming@gmail.com"
|
||||
LABEL author="David Wolfe (Red-Thirten)" maintainer="red_thirten@yahoo.com"
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/parkervcp/yolks"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
@@ -54,8 +54,9 @@ function RunSteamCMD { #[Input: int server=0 mod=1 optional_mod=2; int id]
|
||||
|
||||
# Error checking for SteamCMD
|
||||
steamcmdExitCode=${PIPESTATUS[0]}
|
||||
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)
|
||||
# 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
|
||||
# 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})"
|
||||
@@ -346,6 +347,12 @@ 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}"
|
||||
@@ -395,7 +402,11 @@ fi
|
||||
# Start the Server
|
||||
echo -e "\n${GREEN}[STARTUP]:${NC} Starting server with the following startup command:"
|
||||
echo -e "${CYAN}${modifiedStartup}${NC}\n"
|
||||
${modifiedStartup}
|
||||
if [[ "$STARTUP_PARAMS" == *"-noLogs"* ]]; then
|
||||
${modifiedStartup}
|
||||
else
|
||||
${modifiedStartup} 2>&1 | tee -a "$LOG_FILE"
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\n${RED}PTDL_CONTAINER_ERR: There was an error while attempting to run the start command.${NC}\n"
|
||||
|
@@ -1,8 +1,8 @@
|
||||
FROM --platform=$BUILDPLATFORM debian:bullseye-slim
|
||||
FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim
|
||||
|
||||
LABEL author="David Wolfe (Red-Thirten)" maintainer="rehlmgaming@gmail.com"
|
||||
LABEL author="David Wolfe (Red-Thirten)" maintainer="red_thirten@yahoo.com"
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/parkervcp/yolks"
|
||||
LABEL org.opencontainers.image.source="https://github.com/pelican-eggs/yolks"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
## Update base packages and install dependencies
|
||||
@@ -17,7 +17,6 @@ RUN dpkg --add-architecture i386 \
|
||||
iproute2 \
|
||||
gettext-base \
|
||||
ca-certificates \
|
||||
numactl \
|
||||
libssl-dev \
|
||||
lib32gcc-s1 \
|
||||
libsdl2-2.0-0 \
|
||||
@@ -29,11 +28,17 @@ 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 Arma 3 requiring a valid UID
|
||||
## Prepare NSS Wrapper for the entrypoint as a workaround for DayZ 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} \
|
||||
@@ -46,9 +51,10 @@ 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"]
|
||||
|
@@ -1,15 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
## File: Pterodactyl DayZ SA Image - entrypoint.sh
|
||||
## File: DayZ Image - entrypoint.sh
|
||||
## Author: David Wolfe (Red-Thirten)
|
||||
## Contributors: Aussie Server Hosts (https://aussieserverhosts.com/)
|
||||
## Date: 2022/11/27
|
||||
## Date: 2024/06/05
|
||||
## 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 SA GAME (not server). Only used for Workshop mod downloads.
|
||||
GAME_ID=221100 # SteamCMD ID for the DayZ GAME (not server). Only used for Workshop mod downloads.
|
||||
|
||||
# Color Codes
|
||||
CYAN='\033[0;36m'
|
||||
@@ -45,14 +46,16 @@ function RunSteamCMD { #[Input: int server=0 mod=1; int id]
|
||||
|
||||
# Check if updating server or mod
|
||||
if [[ $1 == 0 ]]; then # Server
|
||||
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}"
|
||||
${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
|
||||
numactl --physcpubind=+0 ${STEAMCMD_DIR}/steamcmd.sh "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +workshop_download_item $GAME_ID $2 +quit | tee -a "${STEAMCMD_LOG}"
|
||||
${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]}
|
||||
if [[ -n $(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|thread") ]]; then # Catch errors (ignore setlocale, SDL, and thread priority warnings)
|
||||
# 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
|
||||
# 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})"
|
||||
@@ -104,8 +107,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 ./Steam/steamapps/workshop/content/$GAME_ID/$2/* ./@$2
|
||||
rm -d ./Steam/steamapps/workshop/content/$GAME_ID/$2
|
||||
mv -f ${WORKSHOP_DIR}/content/$GAME_ID/$2/* ./@$2
|
||||
rm -d ${WORKSHOP_DIR}/content/$GAME_ID/$2
|
||||
# Make the mods contents all lowercase
|
||||
ModsLowercase @$2
|
||||
# Move any .bikey's to the keys directory
|
||||
@@ -238,6 +241,11 @@ 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
|
||||
@@ -280,6 +288,6 @@ echo -e "${CYAN}${modifiedStartup}${NC}\n"
|
||||
${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"
|
||||
echo -e "\n${RED}[STARTUP_ERR]: There was an error while attempting to run the start command.${NC}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
21
games/rust/Dockerfile
Normal file
21
games/rust/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
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" ]
|
48
games/rust/entrypoint.sh
Normal file
48
games/rust/entrypoint.sh
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/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}"
|
140
games/rust/wrapper.js
Executable file
140
games/rust/wrapper.js
Executable file
@@ -0,0 +1,140 @@
|
||||
#!/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();
|
@@ -7,14 +7,20 @@ RUN apt update \
|
||||
RUN dpkg --add-architecture i386 \
|
||||
&& apt update \
|
||||
&& apt upgrade -y \
|
||||
&& apt install -y libstdc++6 lib32stdc++6 tar curl iproute2 openssl fontconfig dirmngr ca-certificates dnsutils tzdata zip tini \
|
||||
&& apt install -y libstdc++6 lib32stdc++6 tar wget 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
|
||||
|
@@ -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 ${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 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
|
||||
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} $( [[ -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 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
|
||||
fi
|
||||
else
|
||||
echo -e "No appid set. Starting Server"
|
||||
|
@@ -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 ${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 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
|
||||
else
|
||||
echo -e "No appid set. Starting Server"
|
||||
fi
|
||||
|
12
go/1.23/Dockerfile
Normal file
12
go/1.23/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
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" ]
|
@@ -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' | eval echo "$(cat -)")
|
||||
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||
|
||||
# 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"
|
||||
# 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"
|
||||
# shellcheck disable=SC2086
|
||||
exec env ${PARSED}
|
||||
eval "$PARSED"
|
||||
|
@@ -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' | eval echo "$(cat -)")
|
||||
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||
|
||||
# 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"
|
||||
# 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"
|
||||
# shellcheck disable=SC2086
|
||||
eval ${PARSED}
|
||||
eval "$PARSED"
|
||||
|
@@ -8,7 +8,7 @@ LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt update -y \
|
||||
&& apt install -y netcat \
|
||||
&& apt install -y netcat-traditional \
|
||||
&& useradd -d /home/container -m container -s /bin/bash
|
||||
|
||||
USER container
|
||||
|
@@ -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 ${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 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
|
||||
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} $( [[ -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 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
|
||||
fi
|
||||
else
|
||||
echo -e "No appid set. Starting Server"
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -6,7 +6,12 @@ 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@9.8.1 typescript ts-node @types/node --location=global
|
||||
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
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container
|
||||
|
@@ -8,6 +8,11 @@ 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
|
||||
|
@@ -8,6 +8,11 @@ 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
|
||||
|
@@ -6,7 +6,12 @@ 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
|
||||
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
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container
|
||||
|
25
nodejs/22/Dockerfile
Normal file
25
nodejs/22/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
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"]
|
25
nodejs/23/Dockerfile
Normal file
25
nodejs/23/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
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"]
|
@@ -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' | eval echo "$(cat -)")
|
||||
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||
|
||||
# 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"
|
||||
# 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"
|
||||
# shellcheck disable=SC2086
|
||||
exec env ${PARSED}
|
||||
eval "$PARSED"
|
||||
|
||||
|
@@ -1,31 +1,35 @@
|
||||
FROM --platform=$TARGETOS/$TARGETARCH ubuntu:22.04
|
||||
FROM --platform=$TARGETOS/$TARGETARCH ubuntu:24.04
|
||||
|
||||
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
|
||||
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
LABEL org.opencontainers.image.source="https://github.com/pelican-eggs/yolks"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
## add container user
|
||||
RUN useradd -m -d /home/container -s /bin/bash container
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
## update base packages
|
||||
RUN apt update \
|
||||
&& apt upgrade -y
|
||||
## Add container user
|
||||
RUN useradd -m -d /home/container -s /bin/bash container
|
||||
ENV USER=container HOME=/home/container
|
||||
|
||||
## 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
|
||||
## Update base packages
|
||||
RUN apt update \
|
||||
&& apt upgrade -y
|
||||
|
||||
## configure locale
|
||||
RUN update-locale lang=en_US.UTF-8 \
|
||||
&& dpkg-reconfigure --frontend noninteractive locales
|
||||
## 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
|
||||
|
||||
WORKDIR /home/container
|
||||
## Configure locale
|
||||
RUN update-locale lang=en_US.UTF-8 \
|
||||
&& dpkg-reconfigure --frontend noninteractive locales
|
||||
|
||||
STOPSIGNAL SIGINT
|
||||
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"]
|
||||
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
|
||||
CMD ["/entrypoint.sh"]
|
||||
|
18
python/3.13/Dockerfile
Normal file
18
python/3.13/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
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"]
|
@@ -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 ${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 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
|
||||
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} $( [[ -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 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
|
||||
fi
|
||||
else
|
||||
echo -e "No appid set. Starting Server"
|
||||
|
@@ -1,22 +1,40 @@
|
||||
FROM --platform=$TARGETOS/$TARGETARCH alpine:edge
|
||||
FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim AS builder
|
||||
|
||||
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
|
||||
# Copy and run the build script
|
||||
COPY build.sh /build.sh
|
||||
RUN chmod +x /build.sh
|
||||
RUN cd / && ./build.sh
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim
|
||||
|
||||
## install dependencies
|
||||
RUN apk add --no-cache murmur tini
|
||||
# Create necessary directories
|
||||
RUN mkdir -p /usr/local/bin /usr/local/share/mumble
|
||||
|
||||
RUN adduser -D container
|
||||
# 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
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/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
|
||||
WORKDIR /home/container
|
||||
|
||||
# Set the stop signal
|
||||
STOPSIGNAL SIGINT
|
||||
|
||||
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/sbin/tini", "-g", "--"]
|
||||
CMD ["/entrypoint.sh"]
|
||||
# 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"]
|
||||
|
155
voice/mumble/build.sh
Normal file
155
voice/mumble/build.sh
Normal file
@@ -0,0 +1,155 @@
|
||||
#!/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
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/ash
|
||||
#!/bin/bash
|
||||
cd /home/container
|
||||
|
||||
# Make internal Docker IP address available to processes.
|
||||
@@ -6,11 +6,12 @@ INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
||||
export INTERNAL_IP
|
||||
|
||||
# Print the Muble server version
|
||||
mumble-server --version
|
||||
echo -e "Mumble release version:"
|
||||
cat /usr/local/share/mumble/latest_tag.txt
|
||||
|
||||
# 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}
|
@@ -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' | eval echo "$(cat -)")
|
||||
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||
|
||||
# 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"
|
||||
# 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"
|
||||
# shellcheck disable=SC2086
|
||||
exec env ${PARSED}
|
||||
eval "$PARSED"
|
||||
|
@@ -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 ${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 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
|
||||
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} $( [[ -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 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
|
||||
fi
|
||||
else
|
||||
echo -e "No appid set. Starting Server"
|
||||
|
Reference in New Issue
Block a user