Merge branch 'pr/fedora-version' into 'main'
Maintain all Fedora versions in main branch; make container-native flow `--from` API work See merge request fedora/bootc/base-images!63
This commit is contained in:
commit
7b7c32b015
|
|
@ -39,10 +39,21 @@ COPY . /src
|
|||
WORKDIR /src
|
||||
RUN rm -vf /src/*.repo
|
||||
COPY --from=repos /etc/yum.repos.d/*.repo /src
|
||||
RUN --mount=type=cache,target=/workdir --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared rpm-ostree compose image \
|
||||
--image-config fedora-bootc-config.json --cachedir=/workdir --format=ociarchive --initialize ${MANIFEST} /buildcontext/out.ociarchive
|
||||
# Brutally inject releasever and repos into manifest file. This is a major hack
|
||||
# until rpm-ostree does this on its own: https://github.com/coreos/rpm-ostree/pull/5136
|
||||
RUN --mount=type=bind,from=repos,src=/,dst=/repos source /repos/etc/os-release && \
|
||||
echo -e "\nreleasever: $VERSION_ID" >> ${MANIFEST} && \
|
||||
echo -e "\nrepos:\n" >> ${MANIFEST} && \
|
||||
dnf repolist --setopt=reposdir=. | tail -n +2 | cut -f1 -d' ' | sed 's/^/- /' >> ${MANIFEST}
|
||||
RUN --mount=type=cache,target=/workdir \
|
||||
--mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared \
|
||||
rpm-ostree compose image --image-config fedora-bootc-config.json \
|
||||
--cachedir=/workdir --format=ociarchive --initialize ${MANIFEST} \
|
||||
/buildcontext/out.ociarchive
|
||||
|
||||
FROM oci-archive:./out.ociarchive
|
||||
# Need to reference builder here to force ordering. But since we have to run
|
||||
# something anyway, we might as well cleanup after ourselves.
|
||||
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
|
||||
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
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -32,6 +32,16 @@ podman build --security-opt=label=disable --cap-add=all \
|
|||
|
||||
See the `Containerfile` for more details. This builds the default `tier-1` image.
|
||||
|
||||
## Fedora versions
|
||||
|
||||
By default, the base images are built for Fedora rawhide. To build against a
|
||||
different Fedora version, you can override the `FROM` image used to obtain the
|
||||
Fedora repos and dnf variables. E.g.:
|
||||
|
||||
```
|
||||
podman build --from quay.io/fedora/fedora:41 ...
|
||||
```
|
||||
|
||||
### Deriving
|
||||
|
||||
You are of course also free to fork, customize, and build base images yourself.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
# NB: This treefile is used by the legacy pungi path only to build tier-1. It
|
||||
# will be removed in the future.
|
||||
releasever: 40
|
||||
repos:
|
||||
- fedora
|
||||
- fedora-updates
|
||||
include: fedora-bootc.yaml
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# NB: This treefile is used by the legacy pungi path only to build tier-1. It
|
||||
# will be removed in the future.
|
||||
releasever: 41
|
||||
repos:
|
||||
- fedora
|
||||
- fedora-updates
|
||||
include: fedora-bootc.yaml
|
||||
|
|
@ -1,7 +1,3 @@
|
|||
releasever: rawhide
|
||||
repos:
|
||||
- rawhide
|
||||
|
||||
metadata:
|
||||
name: fedora-boot-tier1
|
||||
summary: Fedora Bootable Tier 1
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# NB: This treefile is used by the legacy pungi path only to build tier-1. It
|
||||
# will be removed in the future.
|
||||
releasever: rawhide
|
||||
repos:
|
||||
- fedora-rawhide
|
||||
include: fedora-bootc.yaml
|
||||
|
|
@ -1,7 +1,3 @@
|
|||
releasever: rawhide
|
||||
repos:
|
||||
- rawhide
|
||||
|
||||
metadata:
|
||||
name: fedora-boot-tier0
|
||||
summary: Fedora Bootable Tier 0
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
releasever: rawhide
|
||||
repos:
|
||||
- rawhide
|
||||
|
||||
metadata:
|
||||
name: fedora-boot-tier-x
|
||||
summary: Fedora Bootable Tier X
|
||||
|
|
|
|||
Loading…
Reference in New Issue