Files
secureblue/Containerfile
fiftydinar df4f3301ae feat: Add akmods module (#212)
* feat: Add kmods installer module

Credits: @C0dePlayer

This is not ideal as it does not support custom kernels & it involves editing Containerfile.

I believe there is no other way but to make users edit Containerfile for those files to be even pulled of.

I would like this to be through the recipe only, so I will put this as a draft until some better ideas come.

* Update Containerfile

Related to this:

d76cca4f3a/modules/akmods/README.md

* Clarify change of akmod version better

Part of adding support for Surface & Asus images.
2024-01-14 17:24:03 +00:00

51 lines
2.0 KiB
Docker

# This is the Containerfile for your custom image.
# Instead of adding RUN statements here, you should consider creating a script
# in `config/scripts/`. Read more in `modules/script/README.md`
# This Containerfile takes in the recipe, version, and base image as arguments,
# all of which are provided by build.yml when doing builds
# in the cloud. The ARGs have default values, but changing those
# does nothing if the image is built in the cloud.
# !! Warning: changing these might not do anything for you. Read comment above.
ARG IMAGE_MAJOR_VERSION=39
ARG BASE_IMAGE_URL=ghcr.io/ublue-os/silverblue-main
FROM ${BASE_IMAGE_URL}:${IMAGE_MAJOR_VERSION}
# The default recipe is set to the recipe's default filename
# so that `podman build` should just work for most people.
ARG RECIPE=recipe.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 the bling from ublue-os/bling into tmp, to be installed later by the bling module
# Feel free to remove these lines if you want to speed up image builds and don't want any bling
COPY --from=ghcr.io/ublue-os/bling:latest /rpms /tmp/bling/rpms
COPY --from=ghcr.io/ublue-os/bling:latest /files /tmp/bling/files
# 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
# Change this if you want different version/tag of akmods.
COPY --from=ghcr.io/ublue-os/akmods:main-39 /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