Skip to content

Commit

Permalink
Merge pull request moby#3515 from crosbymichael/no-host-name-without-…
Browse files Browse the repository at this point in the history
…networking

Do not add hostname when networking is disabled
  • Loading branch information
creack committed Jan 9, 2014
2 parents 189c405 + 0354c3a commit 42df36b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
}

Expand Down

0 comments on commit 42df36b

Please sign in to comment.