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
This commit is contained in:
Daniel J Walsh
2018-05-23 14:15:54 -04:00
committed by Atomic Bot
parent d252fa710e
commit 915364034f
14 changed files with 1046 additions and 172 deletions

View File

@@ -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]