Skip to content

Commit b195a10

Browse files
author
Santhosh Manohar
committed
Merge pull request #1147 from pyakpyak/master
don't add /etc/hosts record if container's ip is empty (--net=none)
2 parents f9a1590 + 0505a84 commit b195a10

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sandbox_dns_unix.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ func (sb *sandbox) buildHostsFile() error {
9090
func (sb *sandbox) updateHostsFile(ifaceIP string) error {
9191
var mhost string
9292

93+
if ifaceIP == "" {
94+
return nil
95+
}
96+
9397
if sb.config.originHostsPath != "" {
9498
return nil
9599
}

0 commit comments

Comments
 (0)