mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #2469 from dotcloud/hotfix_release2
Hotfix changes for default values in 0.6.5
This commit is contained in:
commit
d7fac67e0a
2 changed files with 19 additions and 10 deletions
|
@ -41,7 +41,7 @@ func main() {
|
||||||
flag.Var(&flHosts, "H", "tcp://host:port to bind/connect to or unix://path/to/socket to use")
|
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")
|
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")
|
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()
|
flag.Parse()
|
||||||
|
|
||||||
|
|
27
runtime.go
27
runtime.go
|
@ -317,20 +317,29 @@ func (runtime *Runtime) Create(config *Config, name string) (*Container, []strin
|
||||||
return nil, nil, err
|
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 img.Config != nil {
|
||||||
if err := MergeConfig(config, img.Config); err != nil {
|
if err := MergeConfig(config, img.Config); err != nil {
|
||||||
return nil, nil, err
|
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 {
|
if len(config.Entrypoint) != 0 && config.Cmd == nil {
|
||||||
config.Cmd = []string{}
|
config.Cmd = []string{}
|
||||||
|
|
Loading…
Reference in a new issue