diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_commit.go | 4 | ||||
-rw-r--r-- | libpod/image/image.go | 5 | ||||
-rw-r--r-- | libpod/image/pull.go | 3 | ||||
-rw-r--r-- | libpod/runtime_img.go | 3 |
4 files changed, 9 insertions, 6 deletions
diff --git a/libpod/container_commit.go b/libpod/container_commit.go index 7b6266d97..dabd224d5 100644 --- a/libpod/container_commit.go +++ b/libpod/container_commit.go @@ -161,7 +161,7 @@ func (c *Container) Commit(ctx context.Context, destImage string, options Contai importBuilder.SetWorkDir(splitChange[1]) } } - candidates, err := util.ResolveName(destImage, "", sc, c.runtime.store) + candidates, _, err := util.ResolveName(destImage, "", sc, c.runtime.store) if err != nil { return nil, errors.Wrapf(err, "error resolving name %q", destImage) } @@ -172,7 +172,7 @@ func (c *Container) Commit(ctx context.Context, destImage string, options Contai if err != nil { return nil, errors.Wrapf(err, "error parsing target image name %q", destImage) } - id, err := importBuilder.Commit(ctx, imageRef, commitOptions) + id, _, _, err := importBuilder.Commit(ctx, imageRef, commitOptions) if err != nil { return nil, err } diff --git a/libpod/image/image.go b/libpod/image/image.go index f39b1d78d..7e520d97e 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -552,7 +552,7 @@ func (i *Image) PushImageToReference(ctx context.Context, dest types.ImageRefere } } // Copy the image to the remote destination - err = cp.Image(ctx, policyContext, dest, src, copyOptions) + _, err = cp.Image(ctx, policyContext, dest, src, copyOptions) if err != nil { return errors.Wrapf(err, "Error copying image to the remote destination") } @@ -912,7 +912,8 @@ func (ir *Runtime) Import(ctx context.Context, path, reference string, writer io if err != nil { errors.Wrapf(err, "error getting image reference for %q", reference) } - if err = cp.Image(ctx, policyContext, dest, src, copyOptions); err != nil { + _, err = cp.Image(ctx, policyContext, dest, src, copyOptions) + if err != nil { return nil, err } return ir.NewFromLocal(reference) diff --git a/libpod/image/pull.go b/libpod/image/pull.go index 9eac2b988..bfa04d069 100644 --- a/libpod/image/pull.go +++ b/libpod/image/pull.go @@ -255,7 +255,8 @@ func (ir *Runtime) doPullImage(ctx context.Context, sc *types.SystemContext, goa if writer != nil && (imageInfo.srcRef.Transport().Name() == DockerTransport || imageInfo.srcRef.Transport().Name() == AtomicTransport) { io.WriteString(writer, fmt.Sprintf("Trying to pull %s...", imageInfo.image)) } - if err = cp.Image(ctx, policyContext, imageInfo.dstRef, imageInfo.srcRef, copyOptions); err != nil { + _, err = cp.Image(ctx, policyContext, imageInfo.dstRef, imageInfo.srcRef, copyOptions) + if err != nil { pullErrors = multierror.Append(pullErrors, err) logrus.Debugf("Error pulling image ref %s: %v", imageInfo.srcRef.StringWithinTransport(), err) if writer != nil { diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go index a21ea7673..be8711734 100644 --- a/libpod/runtime_img.go +++ b/libpod/runtime_img.go @@ -164,5 +164,6 @@ func removeStorageContainers(ctrIDs []string, store storage.Store) error { // Build adds the runtime to the imagebuildah call func (r *Runtime) Build(ctx context.Context, options imagebuildah.BuildOptions, dockerfiles ...string) error { - return imagebuildah.BuildDockerfiles(ctx, r.store, options, dockerfiles...) + _, _, err := imagebuildah.BuildDockerfiles(ctx, r.store, options, dockerfiles...) + return err } |