Skip to content

Conversation

@mahdiyehmr
Copy link

@mahdiyehmr mahdiyehmr commented Oct 11, 2025

Hello, this change would allow the build to use preinstallimage as the base container image for podman and docker build environments. This speeds up the build process since there would be no need to untar the preinstallimage and install the packages inside it.
For making sure it's actually saving time, it would only import the preinstallimage if it doesn't already find it in the host. This check is implemented in preinstall_container_image().
For finding the package ID and HDRMD5 of packages in preinstallimage, it prioritizes the preinstallimageinfo, and if not found, it would fall back to the previous method of reading unpacked preinstallimage.
Added randomization for container name in both podman and Docker to avoid issues in concurrent builds.
This change is intended to be used in conjunction with the change in OSC openSUSE/osc#1957. After this is available in obs-build, it can be utilized with the changes in this fork https://github.com/mahdiyehmr/open-build-service to work with OBS.
I've tested this change with osc build and also in OBS for using Podman and Docker.
I'm not familiar with your PR process. Please let me know if I need to make any changes or if you have any comments.
Thanks

Implement the option to user preinstallimage as base container image for podman and docker
build environments. This speeds up the build process since there would be no need to untar
the preinstallimage and install the packages inside it. It would only import the preinstallimage
if it doesn't already find it implemented in preinstall_container_image().
For finding the package id and HDRMD5 of packages in preinstallimage it prioritizes the preinstallimageinfo
and if not found it would fallback to previous method of reading unpacked preinstallimage.
Adding randomization for container name in both podman and docker to avoid issues in concurrent builds.
@mahdiyehmr
Copy link
Author

@dirkmueller Sorry about that. Removed the trailing whitespace. Can you run the pipeline again please?

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.

1 participant