From 94df7015121759ce69f35f7e7735aa2e4a2dc71a Mon Sep 17 00:00:00 2001 From: cdoern Date: Fri, 14 Jan 2022 13:49:34 -0500 Subject: Implement Podman Container Clone podman container clone takes the id of an existing continer and creates a specgen from the given container's config recreating all proper namespaces and overriding spec options like resource limits and the container name if given in the cli options this command utilizes the common function DefineCreateFlags meaning that we can funnel as many create options as we want into clone over time allowing the user to clone with as much or as little of the original config as they want. container clone takes a second argument which is a new name and a third argument which is an image name to use instead of the original container's the current supported flags are: --destroy (remove the original container) --name (new ctr name) --cpus (sets cpu period and quota) --cpuset-cpus --cpu-period --cpu-rt-period --cpu-rt-runtime --cpu-shares --cpuset-mems --memory --run resolves #10875 Signed-off-by: cdoern Signed-off-by: cdoern Signed-off-by: cdoern --- pkg/api/handlers/libpod/containers_create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/api') diff --git a/pkg/api/handlers/libpod/containers_create.go b/pkg/api/handlers/libpod/containers_create.go index 8e5fc1c1c..61f437faf 100644 --- a/pkg/api/handlers/libpod/containers_create.go +++ b/pkg/api/handlers/libpod/containers_create.go @@ -33,7 +33,7 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) { utils.InternalServerError(w, err) return } - rtSpec, spec, opts, err := generate.MakeContainer(context.Background(), runtime, &sg) + rtSpec, spec, opts, err := generate.MakeContainer(context.Background(), runtime, &sg, false, nil) if err != nil { utils.InternalServerError(w, err) return -- cgit v1.2.3-54-g00ecf