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

FR: support multiple image locations in oci_pull #696

Open
apesternikov opened this issue Sep 10, 2024 · 1 comment
Open

FR: support multiple image locations in oci_pull #696

apesternikov opened this issue Sep 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@apesternikov
Copy link
Member

apesternikov commented Sep 10, 2024

We are mirroring base images to local registry in order to improve availability. Unfortunately this either requires setting up of something like a transparent proxy registry or some kind of additional steps to be done before image is available in a bazel build.
To streamline the mirroring use case, It would be very useful to support multiple image locations, mimicking the "url-urls" pattern used in http_* rules
Example:

oci_pull(
    name = "distroless_java",
    digest = "sha256:161a1d97d592b3f1919801578c3a47c8e932071168a96267698f4b669c24c76d",
    images = [
        "local.registry/mirror/distroless/java17",
        "gcr.io/distroless/java17"
    ],
    platforms = ["linux/amd64"],  # Optional
)

Implementation should try to fetch images in provided order until one succeeds, failing only if all of them fails.
It should be an error if different digests are specified.
It is not clear if this should be also extended to repository and registry parameters.

@apesternikov apesternikov changed the title support multiple image locations in oci_pull FR: support multiple image locations in oci_pull Sep 14, 2024
@thesayyn
Copy link
Collaborator

This is an interesting idea, we'd have to bikeshed an api for this though as it makes the public api more complex.

@thesayyn thesayyn added the enhancement New feature or request label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants