MCPcopy Create free account
hub / github.com/containers/image / convertDockerImageReference

Method convertDockerImageReference

openshift/openshift.go:152–158  ·  view source on GitHub ↗

convertDockerImageReference takes an image API DockerImageReference value and returns a reference we can actually use; currently OpenShift stores the cluster-internal service IPs here, which are unusable from the outside.

(ref string)

Source from the content-addressed store, hash-verified

150// convertDockerImageReference takes an image API DockerImageReference value and returns a reference we can actually use;
151// currently OpenShift stores the cluster-internal service IPs here, which are unusable from the outside.
152func (c *openshiftClient) convertDockerImageReference(ref string) (string, error) {
153 _, repo, gotRepo := strings.Cut(ref, "/")
154 if !gotRepo {
155 return "", fmt.Errorf("Invalid format of docker reference %q: missing '/'", ref)
156 }
157 return reference.Domain(c.ref.dockerReference) + "/" + repo, nil
158}
159
160// These structs are subsets of github.com/openshift/origin/pkg/image/api/v1 and its dependencies.
161type imageStream struct {

Callers 1

ensureImageIsResolvedMethod · 0.80

Calls 1

DomainFunction · 0.92

Tested by

no test coverage detected