mirror of
https://github.com/docker/docs.git
synced 2026-11-05 00:14:17 +03:00
Merge branch 'master' into future
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user