mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Do not add hostname when networking is disabled
Docker-DCO-1.0-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
189c40597f
commit
0354c3a95c
1 changed files with 1 additions and 1 deletions
|
@ -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...)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue