Skip to content

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

@achilleas-k

Description

@achilleas-k

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 ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions