[proxy] do not weave attach containers in '--net=host|container:<name|id>'

This commit is contained in:
Paul Bellamy committed 2015-07-16 13:58:27 +01:00
1 parent 77bc56751b
commit 1132d26d47
5 files changed
+17 -4

No files matched your search

+6 -1
View File
@@ -115,7 +115,12 @@ func (proxy *Proxy) ListenAndServe() error {
return (&http.Server{Handler: proxy}).Serve(listener)
}
func (proxy *Proxy) weaveCIDRsFromConfig(config *docker.Config) ([]string, bool) {
func (proxy *Proxy) weaveCIDRsFromConfig(config *docker.Config, hostConfig *docker.HostConfig) ([]string, bool) {
if hostConfig != nil &&
hostConfig.NetworkMode != "" &&
hostConfig.NetworkMode != "bridge" {
return nil, false
}
for _, e := range config.Env {
if strings.HasPrefix(e, "WEAVE_CIDR=") {
if e[11:] == "none" {