Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 0 additions & 96 deletions Containerfile

This file was deleted.

23 changes: 23 additions & 0 deletions Containerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM scratch as ctx
COPY build_scripts /

FROM ghcr.io/nushell/nushell:latest-alpine as nushell

FROM quay.io/fedora/fedora-bootc:44 as base

COPY --from=nushell /usr/bin/nu /usr/bin/nu
RUN printf '/bin/nu\n/usr/bin/nu' >> /etc/shells

COPY yum-repos/custom.repo /etc/yum.repos.d/custom.repo

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/lib/dnf \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
/ctx/install-base.sh

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/clean-base.sh

RUN bootc container lint
33 changes: 33 additions & 0 deletions Containerfile.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM scratch as ctx
COPY build_scripts /

FROM ghcr.io/nushell/nushell:latest-alpine as nushell

FROM quay.io/fedora/fedora-kinoite:44 as desktop

COPY --from=nushell /usr/bin/nu /usr/bin/nu
RUN printf '/bin/nu\n/usr/bin/nu\n' >> /etc/shells

COPY yum-repos/custom.repo /etc/yum.repos.d/custom.repo

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/lib/dnf \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
/ctx/install-base.sh

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/clean-base.sh

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/lib/dnf \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
/ctx/install-desktop.sh

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/clean-desktop.sh

RUN bootc container lint
47 changes: 47 additions & 0 deletions Containerfile.laptop
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM scratch as ctx
COPY build_scripts /

FROM ghcr.io/nushell/nushell:latest-alpine as nushell

FROM quay.io/fedora/fedora-kinoite:43 as laptop

COPY dracut.conf /usr/lib/dracut/dracut.conf.d/50-custom-ostree.conf

COPY --from=nushell /usr/bin/nu /usr/bin/nu
RUN printf '/bin/nu\n/usr/bin/nu\n' >> /etc/shells

COPY yum-repos/custom.repo /etc/yum.repos.d/custom.repo

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/lib/dnf \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
/ctx/install-base.sh

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/clean-base.sh

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/lib/dnf \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
/ctx/install-desktop.sh

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/clean-desktop.sh

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/lib/dnf \
--mount=type=cache,dst=/var/lib/rpm-state \
--mount=type=tmpfs,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
/ctx/install-laptop.sh

RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
/ctx/clean-laptop.sh

RUN bootc container lint

2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TIMESTAMP=$(date -u +%Y%m%d)

echo "Building ${VARIANT} variant of ${FULL_IMAGE}"

buildah build --target="${VARIANT}" -t "${FULL_IMAGE}:${VARIANT}" .
buildah build -f "Containerfile.${VARIANT}" --target="${VARIANT}" -t "${FULL_IMAGE}:${VARIANT}" .
buildah tag "${FULL_IMAGE}:${VARIANT}" "${FULL_IMAGE}:${VARIANT}-${TIMESTAMP}"

echo "Successfully built ${VARIANT} variant with tags:"
Expand Down