Mirroring backend

Utility backend for mirroring images from one registry to another, or internally in one registry.

Activate with:

backend_packages = [
    ...,
    "pants_backend_oci.utility.mirror",
]

Targets

oci_mirror_image

Mirror a single image.

oci_mirror_image(
    name="base-python",
    repository="docker.io/library/python",
    sha="b78b777208be08edd8f297035cdfbacddb45170ad778fd643c792ee045187e39"
)
ArgumentMeaningDefault value
nameThe target nameThe directory name
source_repositoryFully qualified repository name to pull fromRequired
destination_repositoryFully qualified repository name to pull fromRequired
shaThe digest of the image, minus the @sha: prefix.Required
tagOptional tag to add when pushing.
decsriptionA description of the target
tagsList of tags[]

oci_mirror_images

Mirror multiple shas for one image.

oci_mirror_images(
    name="base-python",
    repository="docker.io/library/python",
	variants={
	    "some-variant": "b78b777208be08edd8f297035cdfbacddb45170ad778fd643c792ee045187e39",
	    "other-tag": "b78b777208be08edd8f297035cdfbacddb45170ad778fd643c792ee045187e39",
    },
)
ArgumentMeaningDefault value
nameThe target nameThe directory name
source_repositoryFully qualified repository name to pull fromRequired
destination_repositoryFully qualified repository name to pull fromRequired
variantsDictionary with tags-to-sha.Required
decsriptionA description of the target
tagsList of tags[]