Merge pull request #28086 from vieux/delete_rootfs_plugin

delete plugin rootfs on `docker plugin rm`
This commit is contained in:
Victor Vieux 2016-11-08 17:03:01 -08:00 committed by GitHub
commit 4b63ad33ec
2 changed files with 2 additions and 0 deletions

View file

@ -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)

View file

@ -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
}