Skip to content

distribution/Dockerfile-ubi: add containerfile for bootc-foundry - #11

Merged
croissanne merged 4 commits into
osbuild:mainfrom
croissanne:container
Mar 20, 2026
Merged

distribution/Dockerfile-ubi: add containerfile for bootc-foundry#11
croissanne merged 4 commits into
osbuild:mainfrom
croissanne:container

Conversation

@croissanne

@croissanne croissanne commented Mar 18, 2026

Copy link
Copy Markdown
Member
distribution/Dockerfile-ubi: add containerfile for bootc-foundry

This container will be used to build the bootc derived containers.

Using buildah in a rootless container requires:
- using vfs as a storage driver as the nested container won't have
access to the fuse device;
- letting the nested container use the host container's user namespace
mapping as the host container won't be able to create a new mapping;
- using the chroot isolation mechanism to let the nested container use
the host container's network and pid namespaces (amongst other things).

@croissanne
croissanne force-pushed the container branch 4 times, most recently from 26c897c to db7239b Compare March 18, 2026 17:03
achilleas-k
achilleas-k previously approved these changes Mar 18, 2026

@achilleas-k achilleas-k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! LGTM.

Some questions but nothing that needs changing.
Except that commit thing, but I wont block.

Comment thread schutzbot/build.sh
Comment thread schutzbot/build.sh
Comment thread distribution/entrypoint.py
@croissanne

croissanne commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

@ondrejbudai you know stuff about containers. I'm pretty sure that on the openshift cluster we won't have much access to special capabilities or the fuse device and things like that. As a result I've resorted to using vfs here.

This makes the bootc containers very large of course but I think if we'll delete each container after pushing we should be fine? My main worry is if this can have an effect on the actual artifact that's being pushed? Like the container should be the same regardless of storage backend and isolation mechanism used, right?

@croissanne
croissanne force-pushed the container branch 8 times, most recently from e4ea0e5 to 0b568f1 Compare March 19, 2026 12:40
@croissanne
croissanne marked this pull request as ready for review March 19, 2026 13:14
@croissanne
croissanne requested review from achilleas-k and lzap March 19, 2026 13:14

@lzap lzap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We how test RHEL builds twice, I think you can drop them from the matrix. So this still can run in parallel with CentOS and Fedora.

Comment thread distribution/Dockerfile-ubi Outdated
Comment thread schutzbot/build.sh
Comment thread schutzbot/container-build.sh Outdated
@croissanne

Copy link
Copy Markdown
Member Author

We how test RHEL builds twice, I think you can drop them from the matrix. So this still can run in parallel with CentOS and Fedora.

removed the 3 builds from the matrix that are now happening in the container (cs9, cs10, and rhel9). But when we write the build matrix declaratively in a separate file, i'll maybe introduce filtering for the entrypoint.py script so we can parallelise it again / build parts of the matrix.

@croissanne
croissanne requested a review from lzap March 19, 2026 15:39
@lzap

lzap commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

I really do not like 27 minutes long test, could we change it a bit? I get the idea that we want to stay as close as possible to RHOS, in that case let's make a 180 deg turn and build everything this way, but let's allow for parallel jobs. The entrypoint could be configurable so in gitlab matrix we can specify which nodes will build what. This way, we can at least speed it up here, what you think?

This makes the bootc containers very large of course but I think if we'll delete each container after pushing we should be fine? My main worry is if this can have an effect on the actual artifact that's being pushed? Like the container should be the same regardless of storage backend and isolation mechanism used, right?

Yes, the result in the end is basically a tarball with JSON metadata. It is up to the container engine to perform more sophisticated storage operations like deduplication or things like that.

@achilleas-k

Copy link
Copy Markdown
Member

Like the container should be the same regardless of storage backend and isolation mechanism used, right?

I think if it's not, then something went very wrong.

Comment thread distribution/entrypoint.py Outdated
This container will be used to build the bootc derived containers.

Using buildah in a rootless container requires:
- using vfs as a storage driver as the nested container will not have
access to the fuse device (for overlayfs-fuse);
- letting the nested container use the host container's user namespace
mapping as the host container will not be able to create a new mapping;
- using the chroot isolation mechanism to let the nested container use
the host container's network and pid namespaces (amongst other things).
@croissanne
croissanne force-pushed the container branch 2 times, most recently from fa8a3e0 to acd3371 Compare March 20, 2026 10:11
Test the (nested) builds in an unprivileged container. The container
builds cs9, cs10, rhel-9.7 and rhel-10.1.
In a scenario where this script is run multiple times in the same
directory, make sure to overwrite the temporary containerfile each time.
@croissanne

Copy link
Copy Markdown
Member Author

around 11 minutes for the slower centos ones now (ig it depends on how fast the registry is as well).

@lzap lzap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thanks!

@croissanne
croissanne merged commit b658100 into osbuild:main Mar 20, 2026
6 checks passed
@croissanne
croissanne deleted the container branch March 20, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants