fedora_atomic_custom_image/Containerfile

29 lines
877 B
Text
Raw Normal View History

2024-10-18 22:06:07 +02:00
# 1. BUILD ARG
2024-10-16 20:34:48 +02:00
ARG FEDORA_MAJOR_VERSION=40
2024-10-11 21:00:57 +02:00
2024-10-18 22:06:07 +02:00
# 2. IMAGES USED TO GET 3RD PARTY CONTENT
2024-10-11 21:00:57 +02:00
# https://github.com/ublue-os/akmods#kmod-packages
2024-10-18 22:06:07 +02:00
FROM ghcr.io/ublue-os/akmods-nvidia-open:main-${FEDORA_MAJOR_VERSION} AS akmods-nvidia
FROM scratch AS base-scripts
COPY scripts /scripts
# 3. BUILD COMMON BASE IMAGE
FROM quay.io/fedora-ostree-desktops/kinoite:${FEDORA_MAJOR_VERSION} AS base
RUN --mount=type=bind,from=base-scripts,src=/scripts,dst=/tmp/scripts \
mkdir -p /var/lib/alternatives && \
/tmp/scripts/install_rpm_fusion.sh && \
ostree container commit
# 4. BUILD NVIDIA VARIANT IMAGE
FROM base AS nvidia
2024-10-18 22:06:07 +02:00
RUN --mount=type=bind,from=akmods-nvidia,src=/rpms,dst=/tmp/akmods-rpms \
--mount=type=bind,from=base-scripts,src=/scripts,dst=/tmp/scripts \
mkdir -p /var/lib/alternatives && \
/tmp/scripts/install_nvidia.sh && \
2024-10-11 21:00:57 +02:00
ostree container commit