Commit graph

21 commits

Author SHA1 Message Date
Dusty Mabe
359c4c04a9 Containerfile: use cache again
We dropped the cache line in df45d53 because it wasn't being used and
also turned out to require some upstream changes [1] to be useful.

Now that rpm-ostree-2025.9 has been released let's default to using
caching again, which will help improve the local developer workflow
by allowing for iterating on builds and not having to re-download
RPMs each cycle.

[1] https://github.com/coreos/rpm-ostree/pull/5391
2025-08-01 11:07:52 +02:00
Dusty Mabe
df45d53551
Containerfile: drop type=cache mount from RUN
We're currently not using this cache /workdir and we ultimately
can't right now until [1] lands in an rpm-ostree release.

See some background context on this in [2] [3].

[1] https://github.com/coreos/rpm-ostree/pull/5391
[2] https://gitlab.com/fedora/bootc/base-images/-/merge_requests/180
[3] https://github.com/coreos/rpm-ostree/pull/5386
2025-05-20 17:45:34 -04:00
Dusty Mabe
d2cfbe1c95
Containerfile: name the python3 dependency
Since bootc-base-imagectl is python3 we need to make sure it's installed
in our `builder` container steps.
2025-04-30 15:01:42 -04:00
Dusty Mabe
b5275ecaf7
Containerfile: support --build-arg BUILDER_IMAGE=quay.io/... too
This will make it easier to override the builder image if that's
desired too.
2025-04-29 15:29:18 -04:00
Dusty Mabe
ebaedc73ed
Containerfile: explain why REPOS_IMAGE is needed
Having this is a bit confusing because the use case for it is exactly
what `podman build --from` was intended for. Let's add a comment here
about why it was added in aa9c6c2 [1], which is because konflux doesn't
support --from yet [1].

[1] https://gitlab.com/fedora/bootc/base-images/-/merge_requests/106#note_2380147640
2025-04-29 15:26:39 -04:00
Dusty Mabe
b251e1cbb3
Containerfile: drop pulling rpm-ostree from copr
Things have stabilized a bit now so let's revert 1a5ba89
so it's easier to override the builder image if someone wants
to do that.
2025-04-29 15:23:34 -04:00
Joseph Marrero Corchado
8b502872d4 Merge branch 'fix-version' into 'main'
Simplify versioning

Closes #40

See merge request fedora/bootc/base-images!150
2025-03-17 07:48:18 -04:00
Colin Walters
383f528989 Simplify versioning
The versioning here was originally inherited from the Fedora CoreOS
configuration. However...the version numbering was always
overridden by coreos-assembler, so it wasn't actually used there!

Conceptually there are two things here:

- OS version
- Arbitrary date stamp

For the "OS version"...well, the closest thing we have actually
to "version of set of RPMs" is a compose today, which is expressed
in a distinct label already - at least for CentOS and RHEL.
For Fedora of course post-branching there are no "composes"
as such but just a set of floating RPMs post-release.

We have the "arbitrary date stamp" in the container image build
time already - and tooling like bootc and rpm-ostree show
both the version and the build time.

Let's significantly simplify our version numbers by just going
to "OS version".

This especially fixes the bug that we weren't setting
`releasever` anymore which just broke the version anyways.

Closes: https://gitlab.com/fedora/bootc/base-images/-/issues/40

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-16 14:48:57 -04:00
Colin Walters
c57120ac52 build-sys: Make target dir for install-manifests configurable
For the use case of updating Konflux lockfiles we want
to be able to easily render the manifests to a tempdir without
installing to `/`.

Move the install of the build script to the main container
build so `install-manifests` only touches manifests.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-12 09:29:12 -04:00
Miguel Martín
aa9c6c2a50
Add an alternative method to set the repos image
Make it possible to set the repos image with a build argument, e.g.:
--build-arg=REPOS_IMAGE=quay.io/fedora/fedora:42

Currently it's only possible use the --from argument, e.g.:
--from=quay.io/fedora/fedora:42

Signed-off-by: Miguel Martín <mmartinv@redhat.com>
2025-03-04 14:10:55 +01:00
Colin Walters
1a5ba8905a container: Use copr rpm-ostree by default
As we're now in a cycle of landing fixes there faster, then once
we stabilize we can drop this.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-03 09:31:22 -05:00
Colin Walters
c89b6f4298 Introduce bootc-base-imagectl
- Embed the manifests into the container image
- Add bootc-base-imagectl which is a tightly controlled frontend
  to execute on those manifests.

For now, we don't attempt to rework how we build the standard
image to actually look like `dnf install`, but we show that
it can work.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:20 -05:00
Colin Walters
7676401abe build-sys: Rework to use new compose rootfs + FROM scratch pattern
This takes some of the logic from what's currently in custom base image branch
and applies it here for the main branch.

We need this in order to not depend on the logic that was
removed in https://github.com/containers/buildah/issues/5952

Note that with the latest rpm-ostree v2025.5 `--source-root`
is significantly improved and we don't need to manually copy
dnf variables or gpg keys.
2025-02-20 19:51:09 -05:00
Joseph Marrero Corchado
7e65f01306 Containerfile: use rawhide as builder to get the latest rpm-ostree 2025-01-21 15:53:14 -05:00
Jonathan Lebon
44258fdde4
Containerfile: clean up temporary hack for --from handling
We have new enough rpm-ostree in Fedora for this now.
2024-10-23 15:35:28 -04:00
Jonathan Lebon
908c347bb9
Containerfile: add temporary hack for --from handling
Using `--from` to set the target releasever doesn't work yet because we
_need_ to set the `releasever` field since the repo files reference it.
There's a pending rpm-ostree PR to fix this but for now hack around it
by manually injecting the necessary variables in the treefile.
2024-10-23 15:35:00 -04:00
Jonathan Lebon
0980197ad9
Containerfile: split long RUN lines
They're getting quite long and hard to parse. Split for legibility.
2024-10-23 15:22:50 -04:00
Colin Walters
b22d3422f4 containerfile: Drop use of bootc-image-builder
This just adds confusion in the end. Switch to bootstrapping
from the app image.
2024-10-03 16:28:49 -04:00
Liora Milbaum
f870a77a25 Only rawhide 2024-05-28 19:53:56 +03:00
Liora Milbaum
43c46b294c Bump fedora container image to a released version only 2024-05-21 21:09:24 +03:00
Colin Walters
79f64a0bcd Containerfile: Make generic
It's already used with `--from` in places, and this way
we have a default.
2024-04-27 08:41:15 -04:00
Renamed from Containerfile.fedora-40 (Browse further)