Add CanonicalDockerReference to ImageDestination

This is necessary to resolve the canonical form of a reference for
signing it.
This commit is contained in:
Miloslav Trmač
2016-05-02 20:59:20 +02:00
parent 2e48975b8b
commit da24e319af
4 changed files with 14 additions and 0 deletions

View File

@@ -268,6 +268,10 @@ func NewOpenshiftImageDestination(imageName, certPath string, tlsVerify bool) (t
}, nil
}
func (d *openshiftImageDestination) CanonicalDockerReference() (string, error) {
return fmt.Sprintf("%s/%s/%s:%s", d.client.baseURL.Host, d.client.namespace, d.client.stream, d.client.tag), nil
}
func (d *openshiftImageDestination) PutManifest(manifest []byte) error {
// Note: This does absolutely no kind/version checking or conversions.
manifestDigest, err := dockerutils.ManifestDigest(manifest)