Merge branch 'master' of ssh://github.com/pterodactyl/yolks

This commit is contained in:
Dane Everitt 2021-07-04 14:31:26 -07:00
commit 85a16a07c2
9 changed files with 185 additions and 3 deletions

38
.github/workflows/base.yml vendored Normal file
View file

@ -0,0 +1,38 @@
name: build oses
on:
schedule:
- cron: "0 0 * * 1"
push:
branches:
- master
paths:
- oses/**
jobs:
push:
name: "yolks:${{ matrix.oses }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
oses:
- alpine
- debian
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
with:
version: "v0.5.1"
buildkitd-flags: --debug
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- uses: docker/build-push-action@v2
with:
context: ./oses/${{ matrix.oses }}
file: ./oses/${{ matrix.oses }}/Dockerfile
platforms: linux/amd64
push: true
tags: |
ghcr.io/pterodactyl/yolks:${{ matrix.oses }}

View file

@ -16,7 +16,7 @@ jobs:
matrix: matrix:
tag: tag:
- alpine - alpine
- source - debian
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1 - uses: docker/setup-buildx-action@v1

View file

@ -1,4 +1,5 @@
# Yolks # Yolks
A curated collection of core images that can be used with Pterodactyl's Egg system. Each image is rebuilt A curated collection of core images that can be used with Pterodactyl's Egg system. Each image is rebuilt
periodically to ensure dependencies are always up-to-date. periodically to ensure dependencies are always up-to-date.
@ -18,6 +19,60 @@ All of these images are available for `linux/amd64` and `linux/arm64` versions,
these images on an arm system, no modification to them or the tag is needed, they should just work. these images on an arm system, no modification to them or the tag is needed, they should just work.
### Contributing ### Contributing
When adding a new version to an existing image, such as `java v42`, you'd add it within a child folder of `java`, so When adding a new version to an existing image, such as `java v42`, you'd add it within a child folder of `java`, so
`java/42/Dockerfile` for example. Please also update the correct `.github/workflows` file to ensure that this new version `java/42/Dockerfile` for example. Please also update the correct `.github/workflows` file to ensure that this new version
is tagged correctly. is tagged correctly.
## Available Images
* [`alpine`](https://github.com/pterodactyl/yolks/tree/master/oses/alpine)
* `ghcr.io/pterodactyl/yolks:alpine`
* [`debian`](https://github.com/pterodactyl/yolks/tree/master/oses/debian)
* `ghcr.io/pterodactyl/yolks:debian`
* [`fivem`](https://github.com/pterodactyl/yolks/tree/master/games/fivem)
* `ghcr.io/pterodactyl/games:fivem`
* [`golang`](https://github.com/pterodactyl/yolks/tree/master/go)
* [`go1.14`](https://github.com/pterodactyl/yolks/tree/master/go/1.14)
* `ghcr.io/pterodactyl/yolks:go_1.14`
* [`go1.15`](https://github.com/pterodactyl/yolks/tree/master/go/1.15)
* `ghcr.io/pterodactyl/yolks:go_1.15`
* [`go1.16`](https://github.com/pterodactyl/yolks/tree/master/go/1.16)
* `ghcr.io/pterodactyl/yolks:go_1.16`
* [`java`](https://github.com/pterodactyl/yolks/tree/master/java)
* [`java7`](https://github.com/pterodactyl/yolks/tree/master/java/7)
* `ghcr.io/pterodactyl/yolks:java_7`
* [`java8`](https://github.com/pterodactyl/yolks/tree/master/java/8)
* `ghcr.io/pterodactyl/yolks:java_8`
* [`java9`](https://github.com/pterodactyl/yolks/tree/master/java/9)
* `ghcr.io/pterodactyl/yolks:java_9`
* [`java11`](https://github.com/pterodactyl/yolks/tree/master/java/11)
* `ghcr.io/pterodactyl/yolks:java_11`
* [`java14`](https://github.com/pterodactyl/yolks/tree/master/java/14)
* `ghcr.io/pterodactyl/yolks:java_14`
* [`java16`](https://github.com/pterodactyl/yolks/tree/master/java/16)
* `ghcr.io/pterodactyl/yolks:java_16`
* [`nodejs`](https://github.com/pterodactyl/yolks/tree/master/nodejs)
* [`node12`](https://github.com/pterodactyl/yolks/tree/master/nodejs/12)
* `ghcr.io/pterodactyl/yolks:nodejs_12`
* [`node14`](https://github.com/pterodactyl/yolks/tree/master/nodejs/14)
* `ghcr.io/pterodactyl/yolks:nodejs_14`
* [`node15`](https://github.com/pterodactyl/yolks/tree/master/nodejs/15)
* `ghcr.io/pterodactyl/yolks:nodejs_15`
* [`node16`](https://github.com/pterodactyl/yolks/tree/master/nodejs/16)
* `ghcr.io/pterodactyl/yolks:nodejs_16`
* [`python`](https://github.com/pterodactyl/yolks/tree/master/python)
* [`python3.7`](https://github.com/pterodactyl/yolks/tree/master/python/3.7)
* `ghcr.io/pterodactyl/yolks:python_3.7`
* [`python3.8`](https://github.com/pterodactyl/yolks/tree/master/python/3.8)
* `ghcr.io/pterodactyl/yolks:python_3.8`
* [`python3.9`](https://github.com/pterodactyl/yolks/tree/master/python/3.9)
* `ghcr.io/pterodactyl/yolks:python_3.9`
### Installation Images
* [`alpine-install`](https://github.com/pterodactyl/yolks/tree/master/installers/alpine)
* `ghcr.io/pterodactyl/installers:alpine`
* [`source-install`](https://github.com/pterodactyl/yolks/tree/master/installers/source)
* `ghcr.io/pterodactyl/installers:source`

View file

@ -38,6 +38,30 @@ cd /home/container || exit 1
# replacing the values. # 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' | eval echo "$(cat -)")
## just in case someone removed the defaults.
if [ "${STEAM_USER}" == "" ]; then
echo -e "steam user is not set.\n"
echo -e "Using anonymous user.\n"
STEAM_USER=anonymous
STEAM_PASS=""
STEAM_AUTH=""
else
echo -e "user set to ${STEAM_USER}"
fi
## if auto_update is not set or to 1 update
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
# Update Source Server
if [ ! -z ${SRCDS_APPID} ]; then
./steamcmd/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +force_install_dir /home/container +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
else
echo -e "Not updating game server as auto update was set to 0. Starting Server"
fi
# Display the command we're running in the output, and then execute it with the env # Display the command we're running in the output, and then execute it with the env
# from the container itself. # from the container itself.
printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED" printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED"

View file

@ -1,6 +1,4 @@
#!/bin/ash #!/bin/ash
#
# Copyright (c) 2021 Matthew Penner # Copyright (c) 2021 Matthew Penner
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy

23
oses/debian/Dockerfile Normal file
View file

@ -0,0 +1,23 @@
FROM --platform=linux/amd64 debian:buster-slim
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks"
LABEL org.opencontainers.image.licenses=MIT
RUN apt update && apt upgrade -y \
&& apt install -y gcc g++ libgcc1 lib32gcc1 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 libicu63 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadbclient-dev libduktape203 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates tzdata \
liblua5.3 libz-dev rapidjson-dev \
&& update-locale lang=en_US.UTF-8 \
&& dpkg-reconfigure --frontend noninteractive locales \
&& useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/bash", "/entrypoint.sh" ]

44
oses/debian/entrypoint.sh Normal file
View file

@ -0,0 +1,44 @@
#!/bin/bash
#
# Copyright (c) 2021 Matthew Penner
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# Default the TZ environment variable to UTC.
TZ=${TZ:-UTC}
export TZ
# Set environment variable that holds the Internal Docker IP
INTERNAL_IP=$(ip route get 1 | awk '{print $NF;exit}')
export INTERNAL_IP
# Switch to the container's working directory
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 -)")
# 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@pterodactyl~ \033[0m%s\n" "$PARSED"
# shellcheck disable=SC2086
exec env ${PARSED}