mirror of
https://github.com/docker/docs.git
synced 2026-03-30 15:58:53 +07:00
require ps -a to show swarm containers
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
@@ -49,6 +49,9 @@ DELETE "/images/{name:.*}"
|
||||
```
|
||||
* `GET "/containers/{name:.*}/json"`: `HostIP` replaced by the the actual Node's IP if `HostIP` is `0.0.0.0`
|
||||
|
||||
* `GET "/containers"/json"`: Node's name prepended to the container name.
|
||||
* `GET "/containers/json"`: Node's name prepended to the container name.
|
||||
|
||||
* `GET "/containers/json"`: `HostIP` replaced by the the actual Node's IP if `HostIP` is `0.0.0.0`
|
||||
|
||||
* `GET "/containers/json"` : Containers started from the `swarm` official image are hidden by default, use `all=1` to display them.
|
||||
|
||||
* `GET "/containers"/json"`: `HostIP` replaed by the the actual Node's IP if `HostIP` is `0.0.0.0`
|
||||
|
||||
@@ -136,6 +136,10 @@ func getContainersJSON(c *context, w http.ResponseWriter, r *http.Request) {
|
||||
if !strings.Contains(tmp.Status, "Up") && !all {
|
||||
continue
|
||||
}
|
||||
// Skip swarm containers unless -a was specified.
|
||||
if strings.Split(tmp.Image, ":")[0] == "swarm" && !all {
|
||||
continue
|
||||
}
|
||||
if !container.Node.IsHealthy() {
|
||||
tmp.Status = "Pending"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user