Add HostGateway constant
Signed-off-by: Gregor Eichelberger <gregor.eichelberger@tuwien.ac.at>
This commit is contained in:
parent
5cb0d3d121
commit
556564667a
|
|
@ -14,6 +14,7 @@ import (
|
|||
|
||||
const (
|
||||
HostContainersInternal = "host.containers.internal"
|
||||
HostGateway = "host-gateway"
|
||||
localhost = "localhost"
|
||||
)
|
||||
|
||||
|
|
@ -244,7 +245,7 @@ func parseExtraHosts(extraHosts []string, hostContainersInternalIP string) (Host
|
|||
return nil, fmt.Errorf("IP address in host entry %q is empty", entry)
|
||||
}
|
||||
ip := values[1]
|
||||
if values[1] == "host-gateway" {
|
||||
if values[1] == HostGateway {
|
||||
ip = hostContainersInternalIP
|
||||
}
|
||||
e := HostEntry{IP: ip, Names: []string{values[0]}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue