fix: Put policy.json in correct spot and cleanup /usr/etc for bootc container lint (#267)

This commit is contained in:
m2
2025-06-19 23:15:17 -04:00
committed by GitHub
parent cf175ba458
commit 4dd980c514
2 changed files with 10 additions and 0 deletions

View File

@@ -43,6 +43,8 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
&& /ctx/post-install-ucore-minimal.sh \
&& /ctx/cleanup.sh
RUN ["bootc", "container", "lint"]
# ucore image section
FROM ucore-minimal AS ucore
@@ -55,6 +57,8 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
/ctx/install-ucore.sh \
&& /ctx/cleanup.sh
RUN ["bootc", "container", "lint"]
# ucore-hci image section
FROM ucore AS ucore-hci
@@ -66,3 +70,5 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=bind,from=ctx,src=/,dst=/ctx \
/ctx/install-ucore-hci.sh \
&& /ctx/cleanup.sh
RUN ["bootc", "container", "lint"]

View File

@@ -36,6 +36,10 @@ find /tmp/rpms/
dnf -y install /tmp/rpms/akmods-common/ublue-os-ucore-addons*.rpm
dnf -y install ublue-os-signing
# Put the policy file in the correct place and cleanup /usr/etc
cp /usr/etc/containers/policy.json /etc/containers/policy.json
rm -rf /usr/etc
# Handle Kernel Skew with override replace
if [[ "${KERNEL_VERSION}" == "${QUALIFIED_KERNEL}" ]]; then
echo "Installing signed kernel from kernel-cache."