buildpacks-community / kpack

Kubernetes Native Container Build Service
Apache License 2.0
943 stars 161 forks source link

Add support for Run Image mirrors #190

Open matthewmcnew opened 4 years ago

matthewmcnew commented 4 years ago

Similar to: https://github.com/pivotal/kpack/issues/79.

Currently, the only way to utilize a run image mirror for a non dockerhub run image is to modify the run images configured in the builder. Unfortunately, this would change the builder's digest.

Without this functionality builds will need to transfer a run image from dockerhub to the destination registry.

matthewmcnew commented 4 years ago

As discussed, @ArieShout @xscript.

matthewmcnew commented 4 years ago

Proposed addition to Builder spec:

stack:
   runImage:
       mirrors:
          - image: gcr.io/cloudfoundry/run:base-cnb

I would avoid configurable run image overrides until we complete: #79.

We should also validate the mirrors have the same digest as the run image configured on the builder.

joaopapereira commented 4 years ago

The status of the builder should be:

status:
   stack:
      runImage: 
          latestImage: some-run-image@sha256:32165463513216351
          mirrors:
              - image: gcr.io/some-run-image@sha256:32165463513216351
      id: run.buildpacks.io

Note: If mirrors do not match the runImage digest, do not include them. Note2: When creating a build only use the run images provided by on the builder status