Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit 77ec4be

Browse files
committed
Add Containerfile.fedora-40
Let's build this again.
1 parent cfafc9e commit 77ec4be

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

.github/workflows/build-image.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
version: stream9
1919
- os: centos
2020
version: stream10
21+
- os: fedora
22+
version: 40
2123

2224
steps:
2325
- name: Update podman

Containerfile.fedora-40

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This container build uses some special features of podman that allow
2+
# a process executing as part of a container build to generate a new container
3+
# image "from scratch".
4+
#
5+
# This container build uses nested containerization, so you must build with e.g.
6+
# podman build --security-opt=label=disable --cap-add=all --device /dev/fuse <...>
7+
#
8+
# # Why are we doing this?
9+
#
10+
# Today this base image build process uses rpm-ostree. There is a lot of things that
11+
# rpm-ostree does when generating a container image...but important parts include:
12+
#
13+
# - auto-updating labels in the container metadata
14+
# - Generating "chunked" content-addressed reproducible image layers (notice
15+
# how there are ~60 layers in the generated image)
16+
#
17+
# The latter bit in particular is currently impossible to do from Containerfile.
18+
# A future goal is adding some support for this in a way that can be honored by
19+
# buildah (xref https://github.com/containers/podman/discussions/12605)
20+
#
21+
# # Why does this build process require additional privileges?
22+
#
23+
# Because it's generating a base image and uses containerbuildcontextization features itself.
24+
# In the future some of this can be lifted.
25+
26+
FROM quay.io/fedora/fedora:40 as repos
27+
28+
FROM quay.io/centos-bootc/bootc-image-builder:latest as builder
29+
ARG MANIFEST=fedora-bootc.yaml
30+
COPY --from=repos /etc/dnf/vars /etc/dnf/vars
31+
COPY --from=repos /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-* /etc/pki/rpm-gpg
32+
COPY . /src
33+
RUN rm -vf /src/*.repo
34+
COPY --from=repos /etc/yum.repos.d/*.repo /src
35+
RUN --mount=type=cache,target=/workdir --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared rpm-ostree compose image --cachedir=/workdir --format=ociarchive --initialize /src/${MANIFEST} /buildcontext/out.ociarchive
36+
37+
FROM oci-archive:./out.ociarchive
38+
# Need to reference builder here to force ordering. But since we have to run
39+
# something anyway, we might as well cleanup after ourselves.
40+
RUN --mount=type=bind,from=builder,src=.,target=/var/tmp --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared rm /buildcontext/out.ociarchive

fedora-bootc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ variables:
33
distro: "fedora"
44

55
repos:
6-
- fedora-devel
7-
- fedora-updates
6+
- fedora
7+
- updates
88

99
metadata:
1010
name: fedora-boot-tier1

0 commit comments

Comments
 (0)