Fix DNF-based ImageBuilder containers and add build and test scripts - #59
Open
erminpour wants to merge 6 commits into
Open
Fix DNF-based ImageBuilder containers and add build and test scripts#59erminpour wants to merge 6 commits into
erminpour wants to merge 6 commits into
Conversation
added 6 commits
September 2, 2026 00:03
Add 'build-dnf-images.sh' to build the DNF-based ImageBuilder container images under 'dockerfiles/dnf/': Dockerfile (AlmaLinux 8.8) Dockerfile.el9 (AlmaLinux 9.6) Dockerfile.minimal (AlmaLinux 8-minimal) Signed-off-by: Victor Erminpour <victor@erminpour.com>
Add 'test-image-builder-containers.sh' to verify the DNF-based ImageBuilder container images provide the required Python, Ansible, Buildah and rootless user namespace configuration. The tests cover: - Container startup - The builder user - Python and pip - Buildah - 'newuidmap'/'newgidmap' - Subordinate UID/GID mappings - Rootless Buildah user namespaces Signed-off-by: Victor Erminpour <victor@erminpour.com>
Update the DNF-based ImageBuilder container to run Buildah rootlessly as the builder user. - Configure subordinate UID/GID mappings for builder - Grant newuidmap and newgidmap the required capabilities - Remove the unnecessary shadow-utils RPM restore - Run the container as builder by default - Set the builder working directory - Use Buildah unshare as the container entrypoint - Suppress pip's root-user warning during dependency installation - Clean up duplicate fuse-overlayfs configuration Signed-off-by: Victor Erminpour <victor@erminpour.com>
Update the EL9 DNF-based ImageBuilder container to align its rootless Buildah configuration with the standard DNF image. - Remove the unnecessary shadow-utils RPM restore - Suppress pip's root-user warning during dependency installation - Clean up duplicate fuse-overlayfs configuration - Fix shell formatting in the Buildah capability setup - Preserve subordinate UID/GID mappings for rootless builds Signed-off-by: Victor Erminpour <victor@erminpour.com>
Update the minimal DNF-based ImageBuilder container to support rootless Buildah execution and align its configuration with the other DNF-based images. - Configure subordinate UID/GID mappings for builder - Grant newuidmap and newgidmap the required capabilities - Install ImageBuilder Python dependencies - Suppress pip root-user warnings during installation - Run the container as the builder user by default - Set the builder working directory - Use Buildah unshare as the container entrypoint - Remove the obsolete manual passwd/group configuration Signed-off-by: Victor Erminpour <victor@erminpour.com>
Remove 'entrypoint.sh' which is no longer required now that the ImageBuilder container configures the builder user and rootless Buildah environment directly in the Dockerfiles. The container now uses Buildah unshare as its entrypoint and no longer needs runtime configuration of subordinate UID/GID mappings or the builder home directory. Signed-off-by: Victor Erminpour <victor@erminpour.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the DNF-based ImageBuilder container images and adds scripts for building
and testing them.
The standard DNF and minimal images had issues with their Buildah/rootless configuration.
This updates the Dockerfiles so the containers are configured correctly and removes the
runtime setup that was previously handled by entrypoint.sh.
Changes:
Testing:
The new test script checks all three DNF-based images and verifies:
The goal is to make the DNF-based container builds reproducible and provide a simple way
to build and verify the resulting images.