mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-04 15:58:39 +00:00
Merge pull request #9648 from estesp/9202-update-resolvconf
Update container resolv.conf when host network changes /etc/resolv.conf
This commit is contained in:
@@ -291,14 +291,6 @@ func NewHTTPRequestError(msg string, res *http.Response) error {
|
||||
}
|
||||
}
|
||||
|
||||
var localHostRx = regexp.MustCompile(`(?m)^nameserver 127[^\n]+\n*`)
|
||||
|
||||
// RemoveLocalDns looks into the /etc/resolv.conf,
|
||||
// and removes any local nameserver entries.
|
||||
func RemoveLocalDns(resolvConf []byte) []byte {
|
||||
return localHostRx.ReplaceAll(resolvConf, []byte{})
|
||||
}
|
||||
|
||||
// An StatusError reports an unsuccessful exit by a command.
|
||||
type StatusError struct {
|
||||
Status string
|
||||
|
||||
Reference in New Issue
Block a user