fedora_atomic_custom_image/Containerfile
2024-10-18 22:06:07 +02:00

28 lines
877 B
Docker

# 1. BUILD ARG
ARG FEDORA_MAJOR_VERSION=40
# 2. IMAGES USED TO GET 3RD PARTY CONTENT
# https://github.com/ublue-os/akmods#kmod-packages
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
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 && \
ostree container commit