-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Currently, ReferenceExpand is hardcoded to "docker.io", which makes it difficult to redirect image pulls to an internal or mirrored registry during builds.
I initially tried using Docker registry mirrors, but I’m guessing docker pull isn’t used under the hood, so that had no effect.
As a workaround, we’re currently using a "just-in-time" sed pass on the YAML file to rewrite image references (e.g. image: "foo/bar" -> image: "some.repo.com/foo/bar"). Another approach would be to pre-populate the linuxkit cache from our mirror, but that requires parsing the YAML and manually pulling images - doable, but even clunkier.
Assuming there isn’t already a flag or mechanism for this that I’ve missed, would the maintainers be open to a PR introducing a CLI flag or environment variable to override the default registry used in ReferenceExpand? I’m not proposing anything as broad as vendoring or full mirror resolution, which is likely out of scope (and certainly out of my current Go skills), just something minimal to support alternate registry defaults cleanly.