mirror of
https://github.com/containers/podman.git
synced 2025-06-27 13:38:49 +08:00
@ -52,13 +52,11 @@ func PodCreate(w http.ResponseWriter, r *http.Request) {
|
||||
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "failed to decode specgen"))
|
||||
return
|
||||
}
|
||||
tempSpec := &specgen.SpecGenerator{} // temporary spec since infra cannot be decoded into
|
||||
err = json.Unmarshal(out, tempSpec) // unmarhal matching options
|
||||
err = json.Unmarshal(out, psg.InfraContainerSpec) // unmarhal matching options
|
||||
if err != nil {
|
||||
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "failed to decode specgen"))
|
||||
return
|
||||
}
|
||||
psg.InfraContainerSpec = tempSpec // set infra spec equal to temp
|
||||
// a few extra that do not have the same json tags
|
||||
psg.InfraContainerSpec.Name = psg.InfraName
|
||||
psg.InfraContainerSpec.ConmonPidFile = psg.InfraConmonPidFile
|
||||
|
Reference in New Issue
Block a user