diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-05-23 14:15:54 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-23 22:38:17 +0000 |
commit | 915364034f1ddf036d277830d45c54b8eb39f940 (patch) | |
tree | 968ec9dfe5a69626a69aef545a5dd429ae695cb1 /vendor/github.com/projectatomic/buildah/util | |
parent | d252fa710e55fde35824dfe1f01e03e783f04a18 (diff) | |
download | podman-915364034f1ddf036d277830d45c54b8eb39f940.tar.gz podman-915364034f1ddf036d277830d45c54b8eb39f940.tar.bz2 podman-915364034f1ddf036d277830d45c54b8eb39f940.zip |
Update podman build to match buildah bud functionality
Add --label, --annotations, --idfile, --squash
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #824
Approved by: TomSweeneyRedHat
Diffstat (limited to 'vendor/github.com/projectatomic/buildah/util')
-rw-r--r-- | vendor/github.com/projectatomic/buildah/util/util.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/vendor/github.com/projectatomic/buildah/util/util.go b/vendor/github.com/projectatomic/buildah/util/util.go index 41bd46cb3..e8539f978 100644 --- a/vendor/github.com/projectatomic/buildah/util/util.go +++ b/vendor/github.com/projectatomic/buildah/util/util.go @@ -70,7 +70,7 @@ func ResolveName(name string, firstRegistry string, sc *types.SystemContext, sto } } - // If the image is from a different transport + // If the image includes a transport's name as a prefix, use it as-is. split := strings.SplitN(name, ":", 2) if len(split) == 2 { if _, ok := Transports[split[0]]; ok { @@ -91,8 +91,16 @@ func ResolveName(name string, firstRegistry string, sc *types.SystemContext, sto // If this domain can cause us to insert something in the middle, check if that happened. repoPath := reference.Path(named) domain := reference.Domain(named) + tag := "" + if tagged, ok := named.(reference.Tagged); ok { + tag = ":" + tagged.Tag() + } + digest := "" + if digested, ok := named.(reference.Digested); ok { + digest = "@" + digested.Digest().String() + } defaultPrefix := RegistryDefaultPathPrefix[reference.Domain(named)] + "/" - if strings.HasPrefix(repoPath, defaultPrefix) && path.Join(domain, repoPath[len(defaultPrefix):]) == name { + if strings.HasPrefix(repoPath, defaultPrefix) && path.Join(domain, repoPath[len(defaultPrefix):])+tag+digest == name { // Yup, parsing just inserted a bit in the middle, so there was a domain name there to begin with. return []string{name} } |