From 471af0a56a387839eb55da17e380b73e36d713b0 Mon Sep 17 00:00:00 2001 From: galdadon Date: Fri, 7 Feb 2025 00:45:45 +0200 Subject: [PATCH] feat(gui): add 'Remove with Force' option in containers panel Added a new menu option to remove containers using `docker rm --force`. --- pkg/gui/containers_panel.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/gui/containers_panel.go b/pkg/gui/containers_panel.go index 92aa95b3..7411c8f6 100644 --- a/pkg/gui/containers_panel.go +++ b/pkg/gui/containers_panel.go @@ -330,6 +330,10 @@ func (gui *Gui) handleContainersRemoveMenu(g *gocui.Gui, v *gocui.View) error { LabelColumns: []string{gui.Tr.Remove, "docker rm " + ctr.ID[1:10]}, OnPress: func() error { return handleMenuPress(container.RemoveOptions{}) }, }, + { + LabelColumns: []string{gui.Tr.RemoveWithForce, "docker rm --force " + ctr.ID[1:10]}, + OnPress: func() error { return handleMenuPress(container.RemoveOptions{Force: true}) }, + }, { LabelColumns: []string{gui.Tr.RemoveWithVolumes, "docker rm --volumes " + ctr.ID[1:10]}, OnPress: func() error { return handleMenuPress(container.RemoveOptions{RemoveVolumes: true}) },