Compare commits
9
Commits
6cc16c40af
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1adf0ae0cd | ||
|
|
f1fb1b63b2 | ||
|
|
850efbc564 | ||
|
|
401f91fb12 | ||
|
|
e21312655f | ||
|
|
9caaae4950 | ||
|
|
d9e68a6941 | ||
|
|
4ade96312b | ||
|
|
fc2454d208 |
No files matched your search
@@ -0,0 +1,39 @@
|
|||||||
|
name: Build FEX Bedrock Stack
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 4 * * 1"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: [docker]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install docker CLI
|
||||||
|
run: |
|
||||||
|
apt-get update -qq && apt-get install -y -qq docker.io >/dev/null
|
||||||
|
|
||||||
|
- name: "Build image (cache-busted: fresh FEX PPA + fresh Ubuntu rootfs)"
|
||||||
|
run: |
|
||||||
|
docker pull ubuntu:24.04
|
||||||
|
DOCKER_BUILDKIT=1 docker build --build-arg EMULATOR=fex --build-arg CACHE_BUST=$(date +%s) \
|
||||||
|
-t git.niklashmotion.art/hermes/fex-bedrock-vanilla:latest \
|
||||||
|
-t git.niklashmotion.art/hermes/fex-bedrock-vanilla:$(date +%Y%m%d) .
|
||||||
|
|
||||||
|
- name: Push to Gitea Registry
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.niklashmotion.art -u Hermes --password-stdin
|
||||||
|
docker push --all-tags git.niklashmotion.art/hermes/fex-bedrock-vanilla
|
||||||
|
docker logout git.niklashmotion.art
|
||||||
|
|
||||||
|
- name: Sync local tag (no container restart)
|
||||||
|
run: |
|
||||||
|
docker pull git.niklashmotion.art/hermes/fex-bedrock-vanilla:latest
|
||||||
|
docker tag git.niklashmotion.art/hermes/fex-bedrock-vanilla:latest fex-bedrock-vanilla:latest
|
||||||
|
# Legacy-Alias fuer Bestandscontainer/BSM-Eintraege (entfernen, sobald niemand mehr den alten Namen nutzt)
|
||||||
|
docker tag git.niklashmotion.art/hermes/fex-bedrock-vanilla:latest fex-bedrock-stack:latest
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
run: docker image prune -f
|
||||||
+5
-2
@@ -1,4 +1,4 @@
|
|||||||
FROM debian
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
# hook into docker BuildKit --platform support
|
# hook into docker BuildKit --platform support
|
||||||
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
||||||
@@ -8,8 +8,11 @@ ARG TARGETVARIANT
|
|||||||
|
|
||||||
RUN --mount=target=/build,source=build /build/install-packages
|
RUN --mount=target=/build,source=build /build/install-packages
|
||||||
|
|
||||||
|
ARG EMULATOR=fex
|
||||||
ARG BOX64_PACKAGE=box64
|
ARG BOX64_PACKAGE=box64
|
||||||
RUN --mount=target=/build,source=build BOX64_PACKAGE=$BOX64_PACKAGE /build/setup-arm64
|
# Cache-bust: force fresh FEX PPA + rootfs download on each pipeline run
|
||||||
|
ARG CACHE_BUST=0
|
||||||
|
RUN --mount=target=/build,source=build EMULATOR=$EMULATOR BOX64_PACKAGE=$BOX64_PACKAGE /build/setup-arm64
|
||||||
|
|
||||||
EXPOSE 19132/tcp
|
EXPOSE 19132/tcp
|
||||||
EXPOSE 19132/udp
|
EXPOSE 19132/udp
|
||||||
|
|||||||
+19
-1
@@ -577,8 +577,26 @@ if isTrue "${ENABLE_SSH}"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting Bedrock server..."
|
echo "Starting Bedrock server..."
|
||||||
if [[ -f /usr/local/bin/box64 ]] && isTrue "${USE_BOX64}" ; then
|
if [[ -f /usr/local/bin/box64 ]] && isTrue "${USE_BOX64:=false}" ; then
|
||||||
exec mc-server-runner "${mcServerRunnerArgs[@]}" box64 ./"$SERVER"
|
exec mc-server-runner "${mcServerRunnerArgs[@]}" box64 ./"$SERVER"
|
||||||
|
elif [[ -x /usr/bin/FEX ]] && isTrue "${USE_FEX:=true}" ; then
|
||||||
|
# FEX-Emu (x86_64 on arm64): RootFS and emulator are baked into the image.
|
||||||
|
# FEX_EMU_DIR holds the JIT/AOT caches — keep it on a volume for warm starts.
|
||||||
|
# FEX >= 2611: unified launcher is /usr/bin/FEX (FEXInterpreter was removed).
|
||||||
|
export FEX_ROOTFS="${FEX_ROOTFS:-/opt/fex-emu-rootfs/rootfs}"
|
||||||
|
export FEX_EMU_DIR="${FEX_EMU_DIR:-$HOME/.fex-emu}"
|
||||||
|
mkdir -p "$FEX_EMU_DIR"
|
||||||
|
if [[ ! -f "$HOME/.config/fex-emu/Config.json" ]]; then
|
||||||
|
mkdir -p "$HOME/.config/fex-emu"
|
||||||
|
cat > "$HOME/.config/fex-emu/Config.json" << 'FEXCONF'
|
||||||
|
{
|
||||||
|
"Options": [
|
||||||
|
{ "Key": "RootFS", "Value": "/opt/fex-emu-rootfs/rootfs" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
FEXCONF
|
||||||
|
fi
|
||||||
|
exec mc-server-runner "${mcServerRunnerArgs[@]}" /usr/bin/FEX ./"$SERVER"
|
||||||
else
|
else
|
||||||
exec mc-server-runner "${mcServerRunnerArgs[@]}" ./"$SERVER"
|
exec mc-server-runner "${mcServerRunnerArgs[@]}" ./"$SERVER"
|
||||||
fi
|
fi
|
||||||
+40
-2
@@ -2,8 +2,46 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
if [ "$TARGETARCH" = "arm64" ] ; then
|
if [ "$TARGETARCH" != "arm64" ] ; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
EMULATOR="${EMULATOR:-fex}"
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
|
if [ "$EMULATOR" = "fex" ] ; then
|
||||||
|
# FEX-Emu: official PPA (arm64 builds), Ubuntu base required
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
|
software-properties-common \
|
||||||
|
squashfs-tools \
|
||||||
|
ca-certificates \
|
||||||
|
curl
|
||||||
|
|
||||||
|
add-apt-repository -y ppa:fex-emu/fex
|
||||||
|
apt-get update
|
||||||
|
|
||||||
|
# fex-emu is a virtual package; pick the explicit variant matching the CPU.
|
||||||
|
# RK3588 (Cortex-A76) has ARMv8.2 features; fall back to armv8.0.
|
||||||
|
FEX_PKG="fex-emu-armv8.2"
|
||||||
|
apt-get install -y --no-install-recommends "$FEX_PKG" || FEX_PKG="fex-emu-armv8.0"
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends "$FEX_PKG" libjemalloc2
|
||||||
|
|
||||||
|
# Thunks are optional but speed up glibc-heavy servers
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y fex-emu-thunks 2>/dev/null || true
|
||||||
|
|
||||||
|
# Bake the x86_64 RootFS into the image so the container is fully self-contained
|
||||||
|
# (no FEXRootFSFetcher at first start, no network needed at runtime)
|
||||||
|
ROOTFS_URL=$(curl -fsSL https://rootfs.fex-emu.gg/RootFS_links.json \
|
||||||
|
| python3 -c "import json,sys; d=json.load(sys.stdin)['v1']; print(d['Ubuntu 24.04 (SquashFS)']['URL'])")
|
||||||
|
echo "Fetching FEX RootFS from $ROOTFS_URL"
|
||||||
|
curl -fsSL "$ROOTFS_URL" -o /tmp/fex-rootfs.sqsh
|
||||||
|
|
||||||
|
# Extracted instead of mounted: works in containers without FUSE/SYS_ADMIN
|
||||||
|
mkdir -p /opt/fex-emu-rootfs
|
||||||
|
unsquashfs -q -d /opt/fex-emu-rootfs/rootfs /tmp/fex-rootfs.sqsh
|
||||||
|
rm -f /tmp/fex-rootfs.sqsh
|
||||||
|
else
|
||||||
|
# Box64 fallback
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y debian-keyring
|
DEBIAN_FRONTEND=noninteractive apt-get install -y debian-keyring
|
||||||
|
|
||||||
curl -L https://ryanfortner.github.io/box64-debs/box64.list -o /etc/apt/sources.list.d/box64.list
|
curl -L https://ryanfortner.github.io/box64-debs/box64.list -o /etc/apt/sources.list.d/box64.list
|
||||||
@@ -13,7 +51,7 @@ if [ "$TARGETARCH" = "arm64" ] ; then
|
|||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
"$BOX64_PACKAGE" \
|
"$BOX64_PACKAGE" \
|
||||||
libjemalloc2
|
libjemalloc2
|
||||||
|
fi
|
||||||
|
|
||||||
apt-get clean
|
apt-get clean
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
fi
|
|
||||||
Reference in new issue
Block a user