Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose option to set target-imgref to a different value from the source imgref #559

Open
achilleas-k opened this issue Jul 23, 2024 · 0 comments

Comments

@achilleas-k
Copy link
Member

I can imagine a few use cases where one might want to build a disk image from a source but set the target image ref to something different. For example, build pipelines with reproducible configurations that pull a specific image version, or an image from an internal container registry, but need the final image to have an update target that pulls from a floating tag or public registry.

This feature would enable something like:

› sudo podman run \
    --rm \
    -it \
    --privileged \
    --pull=newer \
    --security-opt label=type:unconfined_t \
    -v ./output:/output \
    -v /var/lib/containers/storage:/var/lib/containers/storage \
    -v ./config.toml:/config.toml \
    quay.io/centos-bootc/bootc-image-builder:latest \
    --target-imgref registry.example.com/container:<floating tag> \
    registry.example.com/container:<some specific version>

which will flow down to the bootc install command to use <some specific version> to build the image but set the target-imgref to <floating tag>

bootc install to-filesystem ... --target-imgref registry.example.com/container:<floating tag>

Right now, the --target-imgref is always set to the container source value from the bootc-image-builder call registry.example.com/container:<some specific version>.

This should also work for the ISO builds where we set the target-imgref using a %post section in the kickstart using bootc switch --mutage-in-place ....

@achilleas-k achilleas-k transferred this issue from osbuild/images Jul 23, 2024
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

No branches or pull requests

1 participant