diff --git a/scheduler/filter/port.go b/scheduler/filter/port.go index 9bd2a04f6c..e6a0914e8d 100644 --- a/scheduler/filter/port.go +++ b/scheduler/filter/port.go @@ -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