From 06dd4191775e40a1088732a690c18ec630710cba Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:36:29 +0200 Subject: [PATCH 1/2] Create Dockerfile --- box64/Dockerfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 box64/Dockerfile diff --git a/box64/Dockerfile b/box64/Dockerfile new file mode 100644 index 0000000..7d8f1a8 --- /dev/null +++ b/box64/Dockerfile @@ -0,0 +1,34 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim + +LABEL author="QuintenQVD" maintainer="josdekurk@gmail.com" + +ENV DEBIAN_FRONTEND noninteractive + +## Update base packages +RUN apt update \ + && apt upgrade -y + +## Install dependencies +RUN apt install -y libc++-dev libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig libicu67 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadbclient-dev-compat libduktape205 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates \ + libz-dev rapidjson-dev tzdata libevent-dev libzip4 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 build-essential cmake libgdiplus + +## Configure locale +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales + + +##Install box64 +RUN wget https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list \ + && wget -O- https://ryanfortner.github.io/box64-debs/KEY.gpg | gpg --dearmor | tee /usr/share/keyrings/box64-debs-archive-keyring.gpg \ + && apt update && apt install box64 -y + + + +RUN useradd -d /home/container -m container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] From 87f386f237d65a1778c13cd677e1ba437f9ab25f Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:40:21 +0200 Subject: [PATCH 2/2] add files --- .github/workflows/box64.yml | 39 +++++++++++++++++++++++++++++++++++++ README.md | 5 +++++ box64/entrypoint.sh | 13 +++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 .github/workflows/box64.yml create mode 100644 box64/entrypoint.sh diff --git a/.github/workflows/box64.yml b/.github/workflows/box64.yml new file mode 100644 index 0000000..30005ab --- /dev/null +++ b/.github/workflows/box64.yml @@ -0,0 +1,39 @@ +name: build box64 +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - box64/** +jobs: + push: + name: "yolks:${{ matrix.oses }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - box64 + steps: + - uses: actions/checkout@v2 + - uses: docker/setup-qemu-action@v1 + - 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: ./box64 + file: ./${{ matrix.oses }}/Dockerfile + platforms: linux/arm64 + push: true + tags: | + ghcr.io/parkervcp/yolks:${{ matrix.tag }} diff --git a/README.md b/README.md index a65b567..bb4f49d 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,11 @@ is tagged correctly. * [`sinusbot`](/bot/sinusbot) * `ghcr.io/parkervcp/yolks:bot_sinusbot` +### [Box64](/box64) + +* [`Box64`](/box64) + * `ghcr.io/parkervcp/yolks:box64` + ### [Cassandra](/cassandra) * [`cassandra_java8_python27`](/cassandra/cassandra_java8_python2) diff --git a/box64/entrypoint.sh b/box64/entrypoint.sh new file mode 100644 index 0000000..b5facda --- /dev/null +++ b/box64/entrypoint.sh @@ -0,0 +1,13 @@ +#!/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}'` + + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} \ No newline at end of file