From ee814055673ca1d5981a4e9e4788a4199fd2f456 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Wed, 30 Oct 2013 14:36:38 -0700 Subject: [PATCH 1/2] fix warning in build --- runtime.go | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/runtime.go b/runtime.go index d9f5b41590..1eaa11c184 100644 --- a/runtime.go +++ b/runtime.go @@ -317,20 +317,29 @@ func (runtime *Runtime) Create(config *Config, name string) (*Container, []strin return nil, nil, err } + checkDeprecatedExpose := func(config *Config) bool { + if config != nil { + if config.PortSpecs != nil { + for _, p := range config.PortSpecs { + if strings.Contains(p, ":") { + return true + } + } + } + } + return false + } + + warnings := []string{} + if checkDeprecatedExpose(img.Config) || checkDeprecatedExpose(config) { + warnings = append(warnings, "The mapping to public ports on your host has been deprecated. Use -p to publish the ports.") + } + if img.Config != nil { if err := MergeConfig(config, img.Config); err != nil { return nil, nil, err } } - warnings := []string{} - if config.PortSpecs != nil { - for _, p := range config.PortSpecs { - if strings.Contains(p, ":") { - warnings = append(warnings, "The mapping to public ports on your host has been deprecated. Use -p to publish the ports.") - break - } - } - } if len(config.Entrypoint) != 0 && config.Cmd == nil { config.Cmd = []string{} From f7c40a87f3b20f00b073652fc7b4e97a4035ae92 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Wed, 30 Oct 2013 14:39:26 -0700 Subject: [PATCH 2/2] set containers comm to true by default --- docker/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker.go b/docker/docker.go index 362e899ba1..d1c59894d6 100644 --- a/docker/docker.go +++ b/docker/docker.go @@ -41,7 +41,7 @@ func main() { flag.Var(&flHosts, "H", "tcp://host:port to bind/connect to or unix://path/to/socket to use") flEnableIptables := flag.Bool("iptables", true, "Disable iptables within docker") flDefaultIp := flag.String("ip", "0.0.0.0", "Default ip address to use when binding a containers ports") - flInterContainerComm := flag.Bool("enable-container-comm", false, "Enable inter-container communication") + flInterContainerComm := flag.Bool("icc", true, "Enable inter-container communication") flag.Parse()