aurora/Containerfile.in

104 lines
3.5 KiB
Text
Raw Permalink Normal View History

ARG BASE_IMAGE_ORG
ARG BASE_IMAGE_NAME
ARG BASE_IMAGE="${BASE_IMAGE_ORG}/${BASE_IMAGE_NAME}"
ARG FEDORA_MAJOR_VERSION
ARG AKMODS_FLAVOR
ARG KERNEL
ARG COMMON
ARG BREW
FROM ${COMMON} AS common
FROM ${BREW} AS brew
FROM ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}-${KERNEL} AS akmods
#if defined(NVIDIA)
FROM ghcr.io/ublue-os/akmods-nvidia-open:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}-${KERNEL} AS akmods-nvidia-open
#endif
FROM scratch AS ctx
COPY /build_scripts /build_scripts
COPY /build_files /build_files
# /* https://github.com/get-aurora-dev/common */
COPY --from=common /logos /system_files/shared
COPY --from=common /system_files /system_files
COPY --from=common /wallpapers /system_files/shared
# /* https://github.com/ublue-os/brew */
COPY --from=brew /system_files /system_files/shared
COPY /system_files /system_files
# /* aurora image section */
FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS base
ARG AKMODS_FLAVOR="main"
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}"
ARG FEDORA_MAJOR_VERSION=""
ARG IMAGE_NAME="aurora"
ARG IMAGE_VENDOR="ublue-os"
ARG KERNEL=""
ARG SHA_HEAD_SHORT=""
ARG UBLUE_IMAGE_TAG="latest"
ARG VERSION=""
ARG IMAGE_FLAVOR=""
# /* so ghcurl wrapper is available to all later RUNs */
ENV PATH="/tmp/scripts/helpers:${PATH}"
# /* Install Packages, miscellaneous things that need a network */
2026-09-25 07:05:12 -08:00
# /* aurora, no nvidia */
#if !defined(NVIDIA)
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=tmpfs,dst=/var \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=bind,from=akmods,src=/kernel-rpms,dst=/tmp/kernel-rpms \
--mount=type=bind,from=akmods,src=/rpms/common,dst=/tmp/rpms/common \
--mount=type=bind,from=akmods,src=/rpms/kmods,dst=/tmp/rpms/kmods \
--mount=type=secret,id=GITHUB_TOKEN \
/ctx/build_scripts/shared/build-prep.sh && \
/ctx/build_scripts/base/01-packages.sh && \
/ctx/build_scripts/base/02-install-common-kernel-akmods.sh && \
/ctx/build_scripts/base/03-fetch.sh
#endif
2026-09-25 07:05:12 -08:00
# /* aurora-nvidia-open */
#if defined(NVIDIA)
RUN --mount=type=tmpfs,dst=/boot \
--mount=type=tmpfs,dst=/var \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=bind,from=akmods,src=/kernel-rpms,dst=/tmp/kernel-rpms \
--mount=type=bind,from=akmods,src=/rpms/common,dst=/tmp/rpms/common \
--mount=type=bind,from=akmods,src=/rpms/kmods,dst=/tmp/rpms/kmods \
--mount=type=bind,from=akmods-nvidia-open,src=/rpms,dst=/tmp/rpms/nvidia \
--mount=type=secret,id=GITHUB_TOKEN \
/ctx/build_scripts/shared/build-prep.sh && \
/ctx/build_scripts/base/01-packages.sh && \
/ctx/build_scripts/base/02-install-common-kernel-akmods.sh && \
/ctx/build_scripts/base/03-fetch.sh && \
/ctx/build_scripts/base/04-nvidia.sh
#endif
# /* Everything that can be done offline after things are in place should be done here */
refactor: simplify checking for enabled 3rd party repos (#2931) * refactor: simplify checking for enabled 3rd party repos We are generally no longer doing the dnf enable/disable dance (except for the nvidia install script) because we are vendoring the .repo files which simplifies things a bit. Also I think that the move to checking what is allowed instead of checking what is not allowed makes more sense anyway. resolves: https://github.com/ublue-os/aurora/issues/2854 [1] https://github.com/ublue-os/akmods/blob/1e4d10b9acb2c59da485403ccd89d689ec32e9ea/build_files/nvidia/nvidia-install.sh * get openh264 from negativo Our base image [1] can't legally include this from fedora-cisco-openh264 repo. Comparing the spec files for Fedora [2] and Negativo [3], they seem to be built with the same build flags, so they should not have any differing functionality. The fedora-cisco-openh264 repo is currently enabled (which is not the case for F44 images) because our repo validation script broke due to the move to /usr [4]. We are already shipping various other codecs on the system, including mesa, they get more irrelevant each day but we should have this. I don't know why exactly but for some reason we now have a stray /var/log/dnf5.log which makes bootc container lint fail. [1] https://gitlab.com/fedora/ostree/ci-test/-/blob/54e811f17a00ea6b1ad87d82ec0cd63d3b933ca1/common.yaml#L144 [2] https://src.fedoraproject.org/rpms/openh264/blob/cd152284845eb42871a59e3ad4afc2a60543310e/f/openh264.spec [3] https://github.com/negativo17/openh264/blob/dfac89f533c6b20943cb116af8f185a93efc201c/openh264.spec [4] https://fedoraproject.org/wiki/Changes/RelocateRpmRepoConfigsToUsr
2026-09-26 21:34:43 -08:00
# /* dracut freaks out if /var is a different filesystem */
RUN --network=none \
--mount=type=tmpfs,dst=/boot \
refactor: simplify checking for enabled 3rd party repos (#2931) * refactor: simplify checking for enabled 3rd party repos We are generally no longer doing the dnf enable/disable dance (except for the nvidia install script) because we are vendoring the .repo files which simplifies things a bit. Also I think that the move to checking what is allowed instead of checking what is not allowed makes more sense anyway. resolves: https://github.com/ublue-os/aurora/issues/2854 [1] https://github.com/ublue-os/akmods/blob/1e4d10b9acb2c59da485403ccd89d689ec32e9ea/build_files/nvidia/nvidia-install.sh * get openh264 from negativo Our base image [1] can't legally include this from fedora-cisco-openh264 repo. Comparing the spec files for Fedora [2] and Negativo [3], they seem to be built with the same build flags, so they should not have any differing functionality. The fedora-cisco-openh264 repo is currently enabled (which is not the case for F44 images) because our repo validation script broke due to the move to /usr [4]. We are already shipping various other codecs on the system, including mesa, they get more irrelevant each day but we should have this. I don't know why exactly but for some reason we now have a stray /var/log/dnf5.log which makes bootc container lint fail. [1] https://gitlab.com/fedora/ostree/ci-test/-/blob/54e811f17a00ea6b1ad87d82ec0cd63d3b933ca1/common.yaml#L144 [2] https://src.fedoraproject.org/rpms/openh264/blob/cd152284845eb42871a59e3ad4afc2a60543310e/f/openh264.spec [3] https://github.com/negativo17/openh264/blob/dfac89f533c6b20943cb116af8f185a93efc201c/openh264.spec [4] https://fedoraproject.org/wiki/Changes/RelocateRpmRepoConfigsToUsr
2026-09-26 21:34:43 -08:00
--mount=type=tmpfs,dst=/var/log \
--mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/build_scripts/base/16-override-install.sh && \
refactor: simplify checking for enabled 3rd party repos (#2931) * refactor: simplify checking for enabled 3rd party repos We are generally no longer doing the dnf enable/disable dance (except for the nvidia install script) because we are vendoring the .repo files which simplifies things a bit. Also I think that the move to checking what is allowed instead of checking what is not allowed makes more sense anyway. resolves: https://github.com/ublue-os/aurora/issues/2854 [1] https://github.com/ublue-os/akmods/blob/1e4d10b9acb2c59da485403ccd89d689ec32e9ea/build_files/nvidia/nvidia-install.sh * get openh264 from negativo Our base image [1] can't legally include this from fedora-cisco-openh264 repo. Comparing the spec files for Fedora [2] and Negativo [3], they seem to be built with the same build flags, so they should not have any differing functionality. The fedora-cisco-openh264 repo is currently enabled (which is not the case for F44 images) because our repo validation script broke due to the move to /usr [4]. We are already shipping various other codecs on the system, including mesa, they get more irrelevant each day but we should have this. I don't know why exactly but for some reason we now have a stray /var/log/dnf5.log which makes bootc container lint fail. [1] https://gitlab.com/fedora/ostree/ci-test/-/blob/54e811f17a00ea6b1ad87d82ec0cd63d3b933ca1/common.yaml#L144 [2] https://src.fedoraproject.org/rpms/openh264/blob/cd152284845eb42871a59e3ad4afc2a60543310e/f/openh264.spec [3] https://github.com/negativo17/openh264/blob/dfac89f533c6b20943cb116af8f185a93efc201c/openh264.spec [4] https://fedoraproject.org/wiki/Changes/RelocateRpmRepoConfigsToUsr
2026-09-26 21:34:43 -08:00
/ctx/build_scripts/base/17-services.sh && \
/ctx/build_scripts/base/18-image-info.sh && \
/ctx/build_scripts/base/19-initramfs.sh && \
/ctx/build_scripts/shared/clean-stage.sh && \
/ctx/build_scripts/shared/unpackaged.sh && \
/ctx/build_scripts/base/20-tests.sh
CMD ["/sbin/init"]
RUN --network=none \
bootc container lint --fatal-warnings --no-truncate