diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-07 03:25:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 03:25:11 +0100 |
commit | c895d844d448e6890ce80fe81eaf1bf535a1d50e (patch) | |
tree | 893de9a0690f35e9f52ae2f3e5c1191207edf533 | |
parent | fc5ed23560aba091256fb9d792c542fd0ea0384c (diff) | |
parent | e6c7ccc06700ee7e91a265462d1eed5fb574a4bb (diff) | |
download | podman-c895d844d448e6890ce80fe81eaf1bf535a1d50e.tar.gz podman-c895d844d448e6890ce80fe81eaf1bf535a1d50e.tar.bz2 podman-c895d844d448e6890ce80fe81eaf1bf535a1d50e.zip |
Merge pull request #5120 from nalind/varlink-build-id
LibpodAPI.BuildImage: don't require a name for the new image
-rw-r--r-- | pkg/varlinkapi/images.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go index 333595a96..b144bfa5e 100644 --- a/pkg/varlinkapi/images.go +++ b/pkg/varlinkapi/images.go @@ -143,6 +143,7 @@ func (i *LibpodAPI) GetImage(call iopodman.VarlinkCall, id string) error { func (i *LibpodAPI) BuildImage(call iopodman.VarlinkCall, config iopodman.BuildInfo) error { var ( namespace []buildah.NamespaceOption + imageID string err error ) @@ -249,7 +250,8 @@ func (i *LibpodAPI) BuildImage(call iopodman.VarlinkCall, config iopodman.BuildI c := make(chan error) go func() { - _, _, err := i.Runtime.Build(getContext(), options, newPathDockerFiles...) + iid, _, err := i.Runtime.Build(getContext(), options, newPathDockerFiles...) + imageID = iid c <- err close(c) }() @@ -291,13 +293,9 @@ func (i *LibpodAPI) BuildImage(call iopodman.VarlinkCall, config iopodman.BuildI } call.Continues = false - newImage, err := i.Runtime.ImageRuntime().NewFromLocal(config.Output) - if err != nil { - return call.ReplyErrorOccurred(err.Error()) - } br := iopodman.MoreResponse{ Logs: log, - Id: newImage.ID(), + Id: imageID, } return call.ReplyBuildImage(br) } |