- 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
Build Scripts
This directory contains build scripts that run during image creation. Scripts are executed in numerical order.
How It Works
Scripts are named with a number prefix (e.g., 10-build.sh, 20-onepassword.sh) and run in ascending order during the container build process.
Included Scripts
10-build.sh- Main build script for base system modifications, package installation, and service configuration
Example Scripts
20-onepassword.sh.example- Example showing how to install software from third-party RPM repositories (Google Chrome, 1Password)
To use an example script:
- Remove the
.exampleextension - Make it executable:
chmod +x build/20-yourscript.sh - The build system will automatically run it in numerical order
Creating Your Own Scripts
Create numbered scripts for different purposes:
# 10-build.sh - Base system (already exists)
# 20-drivers.sh - Hardware drivers
# 30-development.sh - Development tools
# 40-gaming.sh - Gaming software
# 50-cleanup.sh - Final cleanup tasks
Script Template
#!/usr/bin/env bash
set -oue pipefail
echo "Running custom setup..."
# Your commands here
Best Practices
- Use descriptive names:
20-nvidia-drivers.shis better than20-stuff.sh - One purpose per script: Easier to debug and maintain
- Clean up after yourself: Remove temporary files and disable temporary repos
- Test incrementally: Add one script at a time and test builds
- Comment your code: Future you will thank present you
Disabling Scripts
To temporarily disable a script without deleting it:
- Rename it with
.disabledextension:20-script.sh.disabled - Or remove execute permission:
chmod -x build/20-script.sh
Execution Order
The Containerfile runs scripts like this:
RUN /ctx/build/10-build.sh
If you want to run multiple scripts, you can:
- Modify Containerfile to run each script explicitly
- Create a runner script that executes all numbered scripts
- Use the default and keep everything in
10-build.sh(simplest)
Notes
- Scripts run as root during build
- Build context is available at
/ctx - Use dnf5 for package management (not dnf or yum)
- Always use
-yflag for non-interactive installs