2026-02-17 17:27:26 +01:00
|
|
|
###############################################################################
|
|
|
|
|
# PROJECT NAME CONFIGURATION
|
|
|
|
|
###############################################################################
|
2026-05-10 19:16:03 +02:00
|
|
|
# Name: fluffy-pancake
|
2026-02-17 17:27:26 +01:00
|
|
|
#
|
|
|
|
|
# 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
|
|
|
|
|
|
2026-05-01 13:35:20 +02:00
|
|
|
# Kopiere die Build-Skripte und die neuen Konfigurations-Artefakte in den Kontext
|
2026-02-17 17:27:26 +01:00
|
|
|
COPY build /build
|
2026-05-01 13:35:20 +02:00
|
|
|
COPY configs /configs
|
|
|
|
|
COPY scripts /scripts
|
2026-02-17 17:27:26 +01:00
|
|
|
|
2026-05-01 13:35:20 +02:00
|
|
|
###############################################################################
|
|
|
|
|
# BASE IMAGE
|
|
|
|
|
###############################################################################
|
2026-04-28 18:42:34 +02:00
|
|
|
FROM quay.io/fedora/fedora-kinoite:44
|
2026-02-17 17:27:26 +01:00
|
|
|
|
2026-05-01 13:35:20 +02:00
|
|
|
### /opt (Unverändert)
|
2026-02-17 17:27:26 +01:00
|
|
|
# RUN rm /opt && mkdir /opt
|
|
|
|
|
|
2026-05-01 13:35:20 +02:00
|
|
|
###############################################################################
|
2026-05-24 13:33:53 +02:00
|
|
|
# EXECUTION STAGE (Aufgeteilt in Cache-Layer)
|
2026-05-01 13:35:20 +02:00
|
|
|
###############################################################################
|
2026-05-24 13:33:53 +02:00
|
|
|
|
|
|
|
|
# LAYER 1: Repositories einrichten (Ändert sich fast nie)
|
|
|
|
|
RUN --mount=type=bind,from=ctx,source=/build/10-repos.sh,target=/tmp/10-repos.sh \
|
2026-02-17 17:27:26 +01:00
|
|
|
--mount=type=cache,dst=/var/cache \
|
|
|
|
|
--mount=type=cache,dst=/var/log \
|
|
|
|
|
--mount=type=tmpfs,dst=/tmp \
|
2026-05-24 13:33:53 +02:00
|
|
|
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
|
2026-04-24 20:54:59 +02:00
|
|
|
|
2026-05-01 13:35:20 +02:00
|
|
|
###############################################################################
|
|
|
|
|
# CONFIGURATION LAYER (Der "saubere" Teil)
|
|
|
|
|
###############################################################################
|
2026-03-02 18:45:46 +01:00
|
|
|
|
2026-05-01 13:35:20 +02:00
|
|
|
# 1. Kopiere die Filesystem-Fixes (tmpfiles.d)
|
|
|
|
|
COPY configs/bootc-fix.conf /etc/tmpfiles.d/
|
2026-04-03 18:03:04 +02:00
|
|
|
|
2026-05-23 12:48:21 +02:00
|
|
|
# 2. Kopiere die Systemd-Overrides (Update-Timer und -Service)
|
2026-05-01 15:22:47 +02:00
|
|
|
COPY configs/bootc-timer-override.conf /etc/systemd/system/bootc-fetch-apply-updates.timer.d/override.conf
|
2026-05-01 16:13:29 +02:00
|
|
|
COPY configs/bootc-override.conf /etc/systemd/system/bootc-fetch-apply-updates.service.d/override.conf
|
2026-05-01 13:35:20 +02:00
|
|
|
|
|
|
|
|
# 3. Kopiere das Benachrichtigungs-Skript
|
|
|
|
|
# Wichtig: Das Skript muss auf deinem Host bereits mit 'chmod +x' markiert sein!
|
|
|
|
|
COPY scripts/notify-bootc-user.sh /usr/bin/
|
|
|
|
|
|
2026-05-23 11:41:07 +02:00
|
|
|
# =============================================================================
|
2026-05-23 12:48:21 +02:00
|
|
|
# SYSTEMD SERVICES & PRESETS (Modern Bootc Architecture)
|
2026-05-23 11:41:07 +02:00
|
|
|
# =============================================================================
|
|
|
|
|
|
2026-05-23 12:48:21 +02:00
|
|
|
# 4. Kopiere den Systemd-Service für den Erst-Boot von Flatpak
|
2026-05-23 11:41:07 +02:00
|
|
|
COPY configs/flatpak-preinstall.service /usr/lib/systemd/system/flatpak-preinstall.service
|
2026-05-23 12:48:21 +02:00
|
|
|
|
|
|
|
|
# 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
|
2026-05-23 11:41:07 +02:00
|
|
|
|
2026-05-01 13:35:20 +02:00
|
|
|
###############################################################################
|
2026-05-23 12:48:21 +02:00
|
|
|
# LINTING
|
2026-05-01 13:35:20 +02:00
|
|
|
###############################################################################
|
2026-05-23 12:48:21 +02:00
|
|
|
# Wir räumen zuerst auf, validieren das System via bootc container lint
|
2026-05-12 12:18:55 +02:00
|
|
|
RUN rm -rf /tmp/build /root/.cache/dnf/* && \
|
2026-05-23 12:48:21 +02:00
|
|
|
bootc container lint
|