summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-28 07:06:31 -0700
committerGitHub <noreply@github.com>2019-03-28 07:06:31 -0700
commite7a2eecf5f3975edfb92cd2cacff0d34ef45f808 (patch)
tree5557aaeb6ec27d61b75b1db18dc5e0a4d85c90be /libpod/runtime_ctr.go
parent850326cc192444d1c5cfd8ba6e1015f653b41e73 (diff)
parent179a66f1a0a22be66c0346afa8ea3181d5846fb2 (diff)
downloadpodman-e7a2eecf5f3975edfb92cd2cacff0d34ef45f808.tar.gz
podman-e7a2eecf5f3975edfb92cd2cacff0d34ef45f808.tar.bz2
podman-e7a2eecf5f3975edfb92cd2cacff0d34ef45f808.zip
Merge pull request #2760 from mheon/misc_small_changes
Remove ulele/deepcopier in favor of JSON deep copy
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index f23dc86dd..7c39d8ced 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -19,7 +19,6 @@ import (
opentracing "github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
- "github.com/ulule/deepcopier"
)
// CtrRemoveTimeout is the default number of seconds to wait after stopping a container
@@ -63,7 +62,9 @@ func (r *Runtime) newContainer(ctx context.Context, rSpec *spec.Spec, options ..
ctr.config.ID = stringid.GenerateNonCryptoID()
ctr.config.Spec = new(spec.Spec)
- deepcopier.Copy(rSpec).To(ctr.config.Spec)
+ if err := JSONDeepCopy(rSpec, ctr.config.Spec); err != nil {
+ return nil, errors.Wrapf(err, "error copying runtime spec while creating container")
+ }
ctr.config.CreatedTime = time.Now()
ctr.config.ShmSize = DefaultShmSize