1
0
mirror of https://github.com/docker/docs.git synced 2026-10-31 10:34:26 +03:00

error when docker run without -d

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux
2014-12-08 21:43:03 +00:00
parent b101b6a36a
commit 541cb74e84

View File

@@ -134,6 +134,11 @@ func postContainersCreate(c *context, w http.ResponseWriter, r *http.Request) {
return
}
if config.AttachStdout || config.AttachStdin || config.AttachStderr {
http.Error(w, "Attach is not supported in clustering mode, use -d.", http.StatusInternalServerError)
return
}
container, err := c.scheduler.CreateContainer(&config, r.Form.Get("name"))
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)