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/pull.go | |
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/pull.go')
-rw-r--r-- | vendor/github.com/projectatomic/buildah/pull.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vendor/github.com/projectatomic/buildah/pull.go b/vendor/github.com/projectatomic/buildah/pull.go index 9b8578651..edfaa6216 100644 --- a/vendor/github.com/projectatomic/buildah/pull.go +++ b/vendor/github.com/projectatomic/buildah/pull.go @@ -60,10 +60,15 @@ func localImageNameForReference(ctx context.Context, store storage.Store, srcRef if err != nil { return "", errors.Wrapf(err, "error loading manifest for %q", srcRef) } + // if index.json has no reference name, compute the image digest instead if manifest.Annotations == nil || manifest.Annotations["org.opencontainers.image.ref.name"] == "" { - return "", errors.Errorf("error, archive doesn't have a name annotation. Cannot store image with no name") + name, err = getImageDigest(ctx, srcRef, nil) + if err != nil { + return "", err + } + } else { + name = manifest.Annotations["org.opencontainers.image.ref.name"] } - name = manifest.Annotations["org.opencontainers.image.ref.name"] case util.DirTransport: // supports pull from a directory name = split[1] |