Allow push to use the image id
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #341 Approved by: nalind
This commit is contained in:
parent
38d3cddb0c
commit
15792b227a
|
@ -314,7 +314,7 @@ func Push(image string, dest types.ImageReference, options PushOptions) error {
|
|||
return errors.Wrap(err, "error importing builder information from image")
|
||||
}
|
||||
// Look up the image name and its layer.
|
||||
ref, err := is.Transport.ParseStoreReference(options.Store, image)
|
||||
ref, err := is.Transport.ParseStoreReference(options.Store, builder.FromImage)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error parsing reference to image %q", image)
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ BuildRequires: btrfs-progs-devel
|
|||
BuildRequires: libassuan-devel
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: ostree-devel
|
||||
BuildRequires: make
|
||||
Requires: runc >= 1.0.0-6
|
||||
Requires: container-selinux
|
||||
Requires: skopeo-containers
|
||||
|
|
|
@ -38,3 +38,14 @@ load helpers
|
|||
buildah rmi alpine
|
||||
rm -rf my-dir
|
||||
}
|
||||
|
||||
@test "push with imageid" {
|
||||
cid=$(buildah from --pull --signature-policy ${TESTSDIR}/policy.json alpine)
|
||||
imageid=$(buildah images -q)
|
||||
run buildah push --signature-policy ${TESTSDIR}/policy.json $imageid dir:my-dir
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
buildah rm "$cid"
|
||||
buildah rmi alpine
|
||||
rm -rf my-dir
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue