builder/adapters/container-runner-package.sh

27 lines
1.7 KiB
Bash

# Container Runner integration assets. Server Purpose; no desktop stack.
# Runs inside the isolated builder with $pkg pointing at the purpose assets.
sed 's/Archipelago Core/Archipelago Container Runner/g' \
"$pkg/runtime/usr/lib/archipelago/defaults/os-release" > "$pkg/runtime/usr/lib/archipelago/defaults/os-release-container-runner"
# Server initramfs: keep the Core profile, add keyboard/vconsole for rescue consoles.
sed -e 's/modconf block/modconf kms keyboard sd-vconsole block/' \
"$pkg/runtime/usr/lib/archipelago/mkinitcpio-core.conf" > "$pkg/runtime/usr/lib/archipelago/mkinitcpio-container-runner.conf"
printf 'Container Runner; operator-managed container host\n' > "$pkg/runtime/usr/lib/archipelago/container-runner"
printf 'purpose/server/container-runner\n' > "$pkg/runtime/usr/lib/archipelago/purpose"
mkdir -p "$pkg/runtime/usr/lib/systemd/system-preset" "$pkg/runtime/usr/share/archipelago/container-runner"
cat > "$pkg/runtime/usr/lib/systemd/system-preset/10-archipelago-container-runner.preset" <<'PRESET'
enable cockpit.socket
enable systemd-binfmt.service
disable tailscaled.service
disable firewalld.service
PRESET
cat > "$pkg/runtime/usr/share/archipelago/container-runner/README" <<'EOF'
Container Runner defaults
- Cockpit is enabled on 9090 with its self-signed certificate.
- Tailscale is installed but intentionally disabled; connect it manually:
systemctl enable --now tailscaled && tailscale up
- firewalld is installed but intentionally disabled and carries no rules.
The operator decides which zones, services and ports to open.
- qemu-user-static binfmt registrations are enabled for foreign-architecture images.
- Container data is workload state in /var; OS updates and rollback do not remove it.
EOF