Skip to content

Commit

Permalink
fix: Add post build script to prepare image for ISO creation
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpinder committed Sep 16, 2024
1 parent fbf57e5 commit de45aeb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions scripts/post_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -euo pipefail

if ! command -v bootc; then
rpm-ostree install bootc
fi

bootupctl backend generate-update-metadata
rm -fr /tmp/* /var/*
ostree container commit
3 changes: 2 additions & 1 deletion template/templates/Containerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ RUN --mount=type=bind,from=stage-bins,src=/bins,dst=/tmp/bins \

{% call modules::main_modules_run(recipe.modules_ext, os_version) %}

RUN rm -fr /tmp/* /var/* && ostree container commit
RUN --mount=type=bind,from=ghcr.io/blue-build/cli:{{ exports_tag }}-build-scripts,src=/scripts/,dst=/scripts/ \
/scripts/post_build.sh

# Labels are added last since they cause cache misses with buildah
LABEL {{ blue_build_utils::constants::BUILD_ID_LABEL }}="{{ build_id }}"
Expand Down

0 comments on commit de45aeb

Please sign in to comment.