Merge pull request #28086 from vieux/delete_rootfs_plugin
delete plugin rootfs on `docker plugin rm`
This commit is contained in:
commit
4b63ad33ec
2 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,7 @@ func (s *DockerSuite) TestPluginBasicOps(c *check.C) {
|
|||
c.Assert(out, checker.Contains, "true")
|
||||
|
||||
id, _, err := dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", pNameWithTag)
|
||||
id = strings.TrimSpace(id)
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
out, _, err = dockerCmdWithError("plugin", "remove", pNameWithTag)
|
||||
|
|
|
@ -162,6 +162,7 @@ func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error {
|
|||
}
|
||||
|
||||
pm.pluginStore.Remove(p)
|
||||
os.RemoveAll(filepath.Join(pm.libRoot, p.GetID()))
|
||||
pm.pluginEventLogger(p.GetID(), name, "remove")
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue