Merge pull request #9208 from duglin/Issue8703
Add support for docker exec to return cmd exitStatus Upstream-commit: 00c2a8f323548b7d0aa54cfd10a594dd93ddbed0 Component: engine
This commit is contained in:
@ -957,6 +957,15 @@ func getContainersByName(eng *engine.Engine, version version.Version, w http.Res
|
||||
return job.Run()
|
||||
}
|
||||
|
||||
func getExecByID(eng *engine.Engine, version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
||||
if vars == nil {
|
||||
return fmt.Errorf("Missing parameter 'id'")
|
||||
}
|
||||
var job = eng.Job("execInspect", vars["id"])
|
||||
streamJSON(job, w, false)
|
||||
return job.Run()
|
||||
}
|
||||
|
||||
func getImagesByName(eng *engine.Engine, version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
||||
if vars == nil {
|
||||
return fmt.Errorf("Missing parameter")
|
||||
@ -1281,6 +1290,7 @@ func createRouter(eng *engine.Engine, logging, enableCors bool, dockerVersion st
|
||||
"/containers/{name:.*}/top": getContainersTop,
|
||||
"/containers/{name:.*}/logs": getContainersLogs,
|
||||
"/containers/{name:.*}/attach/ws": wsContainersAttach,
|
||||
"/exec/{id:.*}/json": getExecByID,
|
||||
},
|
||||
"POST": {
|
||||
"/auth": postAuth,
|
||||
|
||||
Reference in New Issue
Block a user