Files
fluffy-pancake/Containerfile
T
gunnar 94460a999d fix: Update-Skript, Containerfile-Optimierungen und chunkah-Rechunking
- notify-bootc-user.sh: D-Bus-Umgebung korrekt fuer Systemd-Service,
  jq-basierter Staging-Check (.status.staged != null), Guard Clauses,
  -Variable entfernt
- Containerfile: COPY --chmod=755 fuer Skript-Permissions
- build/20-multimedia.sh: Redundantes dnf5 clean all entfernt
- build/30-virt.sh: dnf5 autoremove und Cleanup entfernt
- build/40-remove-packages.sh: || true entfernt (Fehler sichtbar machen)
- build/50-prepare-flatpak-for-bazaar.sh: curl -f --retry 3 hinzugefuegt
- build.yml: chunkah Rechunk-Step fuer content-based Layers (Delta-Updates),
  Cache-Key erweitert (scripts/**), continue-on-error entfernt
- build-installer-iso.yml: concurrency-Block hinzugefuegt
2026-05-30 15:42:14 +02:00

103 lines
4.6 KiB
Docker

###############################################################################
# PROJECT NAME CONFIGURATION
###############################################################################
# Name: fluffy-pancake
#
# IMPORTANT: Change "finpilot" above to your desired project name.
# This name should be used consistently throughout the repository in:
# - Justfile: export image_name := env("IMAGE_NAME", "your-name-here")
# - README.md: # your-name-here (title)
# - artifacthub-repo.yml: repositoryID: your-name-here
# - custom/ujust/README.md: localhost/your-name-here:stable (in bootc switch example)
#
# The project name defined here is the single source of truth for your
# custom image's identity. When changing it, update all references above
# to maintain consistency.
###############################################################################
###############################################################################
# MULTI-STAGE BUILD ARCHITECTURE
###############################################################################
FROM scratch AS ctx
# Kopiere die Build-Skripte und die neuen Konfigurations-Artefakte in den Kontext
COPY build /build
COPY configs /configs
COPY scripts /scripts
###############################################################################
# BASE IMAGE
###############################################################################
FROM quay.io/fedora/fedora-kinoite:44
### /opt (Unverändert)
# RUN rm /opt && mkdir /opt
###############################################################################
# EXECUTION STAGE (Aufgeteilt in Cache-Layer)
###############################################################################
# LAYER 1: Repositories einrichten (Ändert sich fast nie)
RUN --mount=type=bind,from=ctx,source=/build/10-repos.sh,target=/tmp/10-repos.sh \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /tmp/10-repos.sh && dnf5 clean all
# LAYER 2: Multimedia Stack (Großer Download - stark gecacht)
RUN --mount=type=bind,from=ctx,source=/build/20-multimedia.sh,target=/tmp/20-multimedia.sh \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /tmp/20-multimedia.sh
# LAYER 3: Virtualisierung & Tools (Großer Download - stark gecacht)
RUN --mount=type=bind,from=ctx,source=/build/30-virt.sh,target=/tmp/30-virt.sh \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /tmp/30-virt.sh
# LAYER 4: Unerwünschte Pakete entfernen (Bereinigungsschicht)
RUN --mount=type=bind,from=ctx,source=/build/40-remove-packages.sh,target=/tmp/40-remove-packages.sh \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /tmp/40-remove-packages.sh
# LAYER 5: Flatpak Vorbereitung (Winzig, ganz unten)
RUN --mount=type=bind,from=ctx,source=/build/50-prepare-flatpak-for-bazaar.sh,target=/tmp/50-prepare-flatpak-for-bazaar.sh \
--mount=type=tmpfs,dst=/tmp \
bash /tmp/50-prepare-flatpak-for-bazaar.sh
###############################################################################
# CONFIGURATION LAYER (Der "saubere" Teil)
###############################################################################
# 1. Kopiere die Filesystem-Fixes (tmpfiles.d)
COPY configs/bootc-fix.conf /etc/tmpfiles.d/
# 2. Kopiere die Systemd-Overrides (Update-Timer und -Service)
COPY configs/bootc-timer-override.conf /etc/systemd/system/bootc-fetch-apply-updates.timer.d/override.conf
COPY configs/bootc-override.conf /etc/systemd/system/bootc-fetch-apply-updates.service.d/override.conf
# 3. Kopiere das Benachrichtigungs-Skript
COPY --chmod=755 scripts/notify-bootc-user.sh /usr/bin/
# =============================================================================
# SYSTEMD SERVICES & PRESETS (Modern Bootc Architecture)
# =============================================================================
# 4. Kopiere den Systemd-Service für den Erst-Boot von Flatpak
COPY configs/flatpak-preinstall.service /usr/lib/systemd/system/flatpak-preinstall.service
# 5. Kopiere die Systemd Presets (Aktiviert flathub-preinstall, libvirtd, etc. ohne /etc-Verschmutzung)
COPY configs/99-custom.preset /usr/lib/systemd/system-preset/99-custom.preset
###############################################################################
# LINTING
###############################################################################
# Wir räumen zuerst auf, validieren das System via bootc container lint
RUN rm -rf /tmp/build /root/.cache/dnf/* && \
bootc container lint