1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #1147 from pyakpyak/master

don't add /etc/hosts record if container's ip is empty (--net=none)
This commit is contained in:
Santhosh Manohar 2016-05-01 13:27:45 -07:00
commit f1780a1fd9

View file

@ -90,6 +90,10 @@ func (sb *sandbox) buildHostsFile() error {
func (sb *sandbox) updateHostsFile(ifaceIP string) error { func (sb *sandbox) updateHostsFile(ifaceIP string) error {
var mhost string var mhost string
if ifaceIP == "" {
return nil
}
if sb.config.originHostsPath != "" { if sb.config.originHostsPath != "" {
return nil return nil
} }