mirror of https://github.com/docker/docs.git
Merge branch 'master' into future
This commit is contained in:
commit
e23ecfdf94
|
@ -1,5 +1,7 @@
|
|||
# swarm: docker clustering
|
||||
|
||||

|
||||
|
||||
## Example usage
|
||||
|
||||
```bash
|
||||
|
|
|
@ -84,6 +84,9 @@ func getContainersJSON(c *context, w http.ResponseWriter, r *http.Request) {
|
|||
if !strings.Contains(tmp.Status, "Up") && !all {
|
||||
continue
|
||||
}
|
||||
if !container.Node().IsHealthy() {
|
||||
tmp.Status = "Pending"
|
||||
}
|
||||
// TODO remove the Node ID in the name when we have a good solution
|
||||
tmp.Names = make([]string, len(container.Names))
|
||||
for i, name := range container.Names {
|
||||
|
|
|
@ -33,7 +33,7 @@ func (p *PortFilter) Filter(config *dockerclient.ContainerConfig, nodes []*clust
|
|||
|
||||
func (p *PortFilter) portAlreadyInUse(node *cluster.Node, requested dockerclient.PortBinding) bool {
|
||||
for _, c := range node.Containers() {
|
||||
for _, port := range c.Info.NetworkSettings.Ports {
|
||||
for _, port := range c.Info.HostConfig.PortBindings {
|
||||
for _, binding := range port {
|
||||
if binding.HostPort == requested.HostPort {
|
||||
// Another container on the same host is binding on the same
|
||||
|
|
Loading…
Reference in New Issue