Add support for reaching containers using host networking on Podman

This commit is contained in:
Adrian Freund 2022-07-19 16:22:08 +02:00 committed by GitHub
parent cdda9a18ab
commit f85f3b68aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -338,6 +338,9 @@ func (p Provider) getIPAddress(ctx context.Context, container dockerData) string
if host, err := net.LookupHost("host.docker.internal"); err == nil {
return host[0]
}
if host, err := net.LookupHost("host.containers.internal"); err == nil {
return host[0]
}
return "127.0.0.1"
}