fix: build workflows and migrate base to oses
Fix bot image workflow build and migrate base images to oses since it appears we already have such folder - although badly named (why not base?).
This commit is contained in:
15
.github/workflows/base.yml
vendored
15
.github/workflows/base.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: build base
|
name: build oses
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * 1"
|
- cron: "0 0 * * 1"
|
||||||
@@ -6,15 +6,16 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- base/**
|
- oses/**
|
||||||
jobs:
|
jobs:
|
||||||
push:
|
push:
|
||||||
name: "yolks:base_${{ matrix.tag }}"
|
name: "yolks_os:${{ matrix.oses }}"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
tag:
|
oses:
|
||||||
|
- alpine
|
||||||
- debian
|
- debian
|
||||||
- ubuntu
|
- ubuntu
|
||||||
steps:
|
steps:
|
||||||
@@ -30,9 +31,9 @@ jobs:
|
|||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
- uses: docker/build-push-action@v2
|
- uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: ./base/${{ matrix.tag }}
|
context: ./oses/${{ matrix.oses }}
|
||||||
file: ./base/${{ matrix.tag }}/Dockerfile
|
file: ./oses/${{ matrix.oses }}/Dockerfile
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/parkervcp/yolks:base_${{ matrix.tag }}
|
ghcr.io/parkervcp/yolks_os:${{ matrix.oses }}
|
||||||
|
2
.github/workflows/bot.yml
vendored
2
.github/workflows/bot.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
|||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
- uses: docker/build-push-action@v2
|
- uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: ./bot
|
context: ./bot/${{ matrix.tag }}
|
||||||
file: ./bot/${{ matrix.tag }}/Dockerfile
|
file: ./bot/${{ matrix.tag }}/Dockerfile
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
|
@@ -30,6 +30,8 @@ is tagged correctly.
|
|||||||
* `ghcr.io/parkervcp/yolks:alpine`
|
* `ghcr.io/parkervcp/yolks:alpine`
|
||||||
* [debian](/oses/debian)
|
* [debian](/oses/debian)
|
||||||
* `ghcr.io/parkervcp/yolks:debian`
|
* `ghcr.io/parkervcp/yolks:debian`
|
||||||
|
* [debian](/oses/ubuntu)
|
||||||
|
* `ghcr.io/parkervcp/yolks:ubuntu`
|
||||||
### [Cassandra](/cassandra)
|
### [Cassandra](/cassandra)
|
||||||
* [`cassandra_java8_python27`](/cassandra/cassandra_java8_python2)
|
* [`cassandra_java8_python27`](/cassandra/cassandra_java8_python2)
|
||||||
* `ghcr.io/parkervcp/yolks:cassandra_java11_python2`
|
* `ghcr.io/parkervcp/yolks:cassandra_java11_python2`
|
||||||
|
@@ -1,30 +0,0 @@
|
|||||||
FROM debian:buster-slim
|
|
||||||
|
|
||||||
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
|
|
||||||
## add container user
|
|
||||||
RUN useradd -m -d /home/container -s /bin/bash container
|
|
||||||
|
|
||||||
RUN ln -s /home/container/ /nonexistent
|
|
||||||
|
|
||||||
ENV USER=container HOME=/home/container
|
|
||||||
|
|
||||||
## update base packages
|
|
||||||
RUN apt update \
|
|
||||||
&& apt upgrade -y
|
|
||||||
|
|
||||||
## install dependencies
|
|
||||||
RUN 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
|
|
||||||
|
|
||||||
## configure locale
|
|
||||||
RUN update-locale lang=en_US.UTF-8 \
|
|
||||||
&& dpkg-reconfigure --frontend noninteractive locales
|
|
||||||
|
|
||||||
WORKDIR /home/container
|
|
||||||
|
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
|
||||||
CMD ["/bin/bash", "/entrypoint.sh"]
|
|
@@ -16,4 +16,4 @@ ENV USER=container HOME=/home/container
|
|||||||
WORKDIR /home/container
|
WORKDIR /home/container
|
||||||
|
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
CMD ["/bin/bash", "/entrypoint.sh"]
|
CMD ["/bin/bash", "/entrypoint.sh"]
|
||||||
|
@@ -1,23 +1,30 @@
|
|||||||
FROM --platform=linux/amd64 debian:buster-slim
|
FROM debian:buster-slim
|
||||||
|
|
||||||
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
|
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
|
||||||
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks"
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
LABEL org.opencontainers.image.licenses=MIT
|
|
||||||
|
|
||||||
RUN apt update && apt upgrade -y \
|
## add container user
|
||||||
&& 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 \
|
RUN useradd -m -d /home/container -s /bin/bash container
|
||||||
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
|
RUN ln -s /home/container/ /nonexistent
|
||||||
ENV USER=container HOME=/home/container
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
|
|
||||||
WORKDIR /home/container
|
ENV USER=container HOME=/home/container
|
||||||
|
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
## update base packages
|
||||||
CMD [ "/bin/bash", "/entrypoint.sh" ]
|
RUN apt update \
|
||||||
|
&& apt upgrade -y
|
||||||
|
|
||||||
|
## install dependencies
|
||||||
|
RUN 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
|
||||||
|
|
||||||
|
## configure locale
|
||||||
|
RUN update-locale lang=en_US.UTF-8 \
|
||||||
|
&& dpkg-reconfigure --frontend noninteractive locales
|
||||||
|
|
||||||
|
WORKDIR /home/container
|
||||||
|
|
||||||
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
|
CMD ["/bin/bash", "/entrypoint.sh"]
|
@@ -1,44 +0,0 @@
|
|||||||
#!/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}
|
|
@@ -1,6 +1,6 @@
|
|||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
LABELauthor="Michael Parker" maintainer="parker@pterodactyl.io"
|
LABEL author="Michael Parker" maintainer="parker@pterodactyl.io"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
@@ -21,4 +21,4 @@ RUN update-locale lang=en_US.UTF-8 \
|
|||||||
&& dpkg-reconfigure --frontend noninteractive locales
|
&& dpkg-reconfigure --frontend noninteractive locales
|
||||||
|
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
CMD ["/bin/bash", "/entrypoint.sh"]
|
CMD ["/bin/bash", "/entrypoint.sh"]
|
Reference in New Issue
Block a user