aboutsummaryrefslogtreecommitdiff
path: root/libpod/container_commit.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-04-18 16:48:35 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-19 14:08:47 +0000
commit27107fdac1d75f97caab47cd13efb1d9900cf350 (patch)
treef5edafbb52505829b15e19ea6a9e66f4440e862b /libpod/container_commit.go
parent6a9dbf3305e93e5e1c3bff09402a9b801c935fbd (diff)
downloadpodman-27107fdac1d75f97caab47cd13efb1d9900cf350.tar.gz
podman-27107fdac1d75f97caab47cd13efb1d9900cf350.tar.bz2
podman-27107fdac1d75f97caab47cd13efb1d9900cf350.zip
Vendor in latest containers/image and contaners/storage
Made necessary changes to functions to include contex.Context wherever needed Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #640 Approved by: baude
Diffstat (limited to 'libpod/container_commit.go')
-rw-r--r--libpod/container_commit.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/libpod/container_commit.go b/libpod/container_commit.go
index bfdfb6ce4..e136f96a4 100644
--- a/libpod/container_commit.go
+++ b/libpod/container_commit.go
@@ -1,6 +1,7 @@
package libpod
import (
+ "context"
"strings"
is "github.com/containers/image/storage"
@@ -24,7 +25,7 @@ type ContainerCommitOptions struct {
// Commit commits the changes between a container and its image, creating a new
// image
-func (c *Container) Commit(destImage string, options ContainerCommitOptions) (*image.Image, error) {
+func (c *Container) Commit(ctx context.Context, destImage string, options ContainerCommitOptions) (*image.Image, error) {
if !c.batched {
c.lock.Lock()
defer c.lock.Unlock()
@@ -55,7 +56,7 @@ func (c *Container) Commit(destImage string, options ContainerCommitOptions) (*i
ReportWriter: options.ReportWriter,
SystemContext: sc,
}
- importBuilder, err := buildah.ImportBuilder(c.runtime.store, builderOptions)
+ importBuilder, err := buildah.ImportBuilder(ctx, c.runtime.store, builderOptions)
if err != nil {
return nil, err
}
@@ -96,7 +97,7 @@ func (c *Container) Commit(destImage string, options ContainerCommitOptions) (*i
return nil, err
}
- if err = importBuilder.Commit(imageRef, commitOptions); err != nil {
+ if err = importBuilder.Commit(ctx, imageRef, commitOptions); err != nil {
return nil, err
}
return c.runtime.imageRuntime.NewFromLocal(imageRef.DockerReference().String())