summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/containers_create.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-09 20:08:29 +0000
committerGitHub <noreply@github.com>2020-11-09 20:08:29 +0000
commit716f70b5c58c416b31427252067e5d2222240afc (patch)
tree94b8d7ccaef08f30e11b5577c117c51dbc8b2f59 /pkg/api/handlers/compat/containers_create.go
parent110a1d8f25c87739afe790ac2bc461937f17222a (diff)
parent2d50ec69965af3e5e15922094294fd451d468c46 (diff)
downloadpodman-716f70b5c58c416b31427252067e5d2222240afc.tar.gz
podman-716f70b5c58c416b31427252067e5d2222240afc.tar.bz2
podman-716f70b5c58c416b31427252067e5d2222240afc.zip
Merge pull request #8236 from jwhonce/jira/run-976
Update CI tests to run python docker library against API
Diffstat (limited to 'pkg/api/handlers/compat/containers_create.go')
-rw-r--r--pkg/api/handlers/compat/containers_create.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go
index f9407df1a..4efe770b3 100644
--- a/pkg/api/handlers/compat/containers_create.go
+++ b/pkg/api/handlers/compat/containers_create.go
@@ -54,6 +54,9 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
return
}
+ // Add the container name to the input struct
+ input.Name = query.Name
+
// Take input structure and convert to cliopts
cliOpts, args, err := common.ContainerCreateToContainerCLIOpts(input, rtc.Engine.CgroupManager)
if err != nil {
@@ -65,6 +68,7 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "fill out specgen"))
return
}
+
ic := abi.ContainerEngine{Libpod: runtime}
report, err := ic.ContainerCreate(r.Context(), sg)
if err != nil {