From 1b509a94506956c74b44fb72c57d78b34e87e6c3 Mon Sep 17 00:00:00 2001 From: Jakub Kujawa Date: Sun, 4 Feb 2024 13:16:56 +0100 Subject: [PATCH] chore: add containerfile to copy akmods for F39 --- Containerfile | 36 ---------------------- config/common_modules/containerfile.yml | 3 ++ config/containerfiles/akmods/Containerfile | 1 + config/silverflow-nvidia-39.yml | 1 + 4 files changed, 5 insertions(+), 36 deletions(-) delete mode 100644 Containerfile create mode 100644 config/common_modules/containerfile.yml create mode 100644 config/containerfiles/akmods/Containerfile diff --git a/Containerfile b/Containerfile deleted file mode 100644 index dbe2f3a332..0000000000 --- a/Containerfile +++ /dev/null @@ -1,36 +0,0 @@ -# ! The ARGs have default values, but changing those ! -# ! does nothing if the image is built in the cloud. ! -ARG IMAGE_MAJOR_VERSION="${IMAGE_MAJOR_VERSION:-39}" -ARG BASE_IMAGE_URL=ghcr.io/ublue-os/silverblue-main - -FROM ${BASE_IMAGE_URL}:${IMAGE_MAJOR_VERSION} - -ARG IMAGE_MAJOR_VERSION="${IMAGE_MAJOR_VERSION:-39}" - -ARG RECIPE=silverflow-nvidia.yml - -# The default image registry to write to policy.json and cosign.yaml -ARG IMAGE_REGISTRY=ghcr.io/ublue-os - -COPY cosign.pub /usr/share/ublue-os/cosign.pub - -# Copy build scripts & configuration -COPY build.sh /tmp/build.sh -COPY config /tmp/config/ - -# Copy modules -# The default modules are inside ublue-os/bling -COPY --from=ghcr.io/ublue-os/bling:latest /modules /tmp/modules/ - -# Custom modules overwrite defaults -COPY modules /tmp/modules/ - -# `yq` is used for parsing the yaml configuration -# It is copied from the official container image since it's not available as an RPM. -COPY --from=docker.io/mikefarah/yq /usr/bin/yq /usr/bin/yq - -# ! Starting with F39, the main image does not contain kmods ! -COPY --from=ghcr.io/ublue-os/akmods:main-${IMAGE_MAJOR_VERSION} /rpms /tmp/rpms - -# Run the build script, then clean up temp files and finalize container build. -RUN chmod +x /tmp/build.sh && /tmp/build.sh && rm -rf /tmp/* /var/* && ostree container commit diff --git a/config/common_modules/containerfile.yml b/config/common_modules/containerfile.yml new file mode 100644 index 0000000000..65e7fa04a7 --- /dev/null +++ b/config/common_modules/containerfile.yml @@ -0,0 +1,3 @@ +type: containerfile +containerfiles: + - akmods \ No newline at end of file diff --git a/config/containerfiles/akmods/Containerfile b/config/containerfiles/akmods/Containerfile new file mode 100644 index 0000000000..c0a6cbddbb --- /dev/null +++ b/config/containerfiles/akmods/Containerfile @@ -0,0 +1 @@ +COPY --from=ghcr.io/ublue-os/akmods:main-39 /rpms /tmp/rpms \ No newline at end of file diff --git a/config/silverflow-nvidia-39.yml b/config/silverflow-nvidia-39.yml index a52cc1dced..79269ea4f0 100644 --- a/config/silverflow-nvidia-39.yml +++ b/config/silverflow-nvidia-39.yml @@ -4,6 +4,7 @@ base-image: ghcr.io/ublue-os/silverblue-nvidia image-version: 39 modules: + - from-file: common_modules/containerfile.yml - from-file: common_modules/akmods.yml - from-file: common_modules/files.yml - from-file: common_modules/rpm-ostree.yml