mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Clean hosts entries on endpoint leave
- Currently when a sandbox disconnect from a network the network's services are not removed from the sandbox's /etc/hosts file Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
e550f1b840
commit
4cc65d01a6
1 changed files with 2 additions and 0 deletions
|
@ -512,6 +512,8 @@ func (ep *endpoint) sbLeave(sbox Sandbox, options ...EndpointOption) error {
|
|||
return err
|
||||
}
|
||||
|
||||
sb.deleteHostsEntries(n.getSvcRecords(ep))
|
||||
|
||||
if sb.needDefaultGW() {
|
||||
ep := sb.getEPwithoutGateway()
|
||||
if ep == nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue