mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-23 15:37:26 +00:00
Merge pull request #3515 from crosbymichael/no-host-name-without-networking
Do not add hostname when networking is disabled
This commit is contained in:
+1
-1
@@ -1044,7 +1044,7 @@ ff02::2 ip6-allrouters
|
||||
|
||||
if container.Config.Domainname != "" {
|
||||
hostsContent = append([]byte(fmt.Sprintf("%s\t%s.%s %s\n", IP, container.Config.Hostname, container.Config.Domainname, container.Config.Hostname)), hostsContent...)
|
||||
} else {
|
||||
} else if !container.Config.NetworkDisabled {
|
||||
hostsContent = append([]byte(fmt.Sprintf("%s\t%s\n", IP, container.Config.Hostname)), hostsContent...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user