mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
Add trailing empty line in /etc/hosts that seem to be causing flakiness in name resolution for the last service mentioned
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
parent
1ecfa703f5
commit
3e797f5088
@ -33,6 +33,10 @@ func SetHostNames(file string, hosts ...string) error {
|
||||
fmt.Println("Setting local hosts for " + strings.Join(hosts, ", "))
|
||||
for _, host := range hosts {
|
||||
_, err = f.WriteString("\n127.0.0.1 " + host)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
_, err = f.WriteString("\n")
|
||||
return err
|
||||
}
|
||||
|
2
aci/etchosts/testdata/etchosts.golden
vendored
2
aci/etchosts/testdata/etchosts.golden
vendored
@ -1,4 +1,4 @@
|
||||
|
||||
127.0.0.1 foo
|
||||
127.0.0.1 bar
|
||||
127.0.0.1 zot
|
||||
127.0.0.1 zot
|
||||
|
Loading…
x
Reference in New Issue
Block a user