chore: show container image for the remove container plan operation

This commit is contained in:
Pasha Sviderski
2025-11-04 18:15:16 +10:00
parent 882f2f5d03
commit 6e4439bf49
3 changed files with 34 additions and 30 deletions
+6
View File
@@ -8,6 +8,7 @@ import (
"time"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/go-units"
)
@@ -144,6 +145,11 @@ type ServiceContainer struct {
ServiceSpec ServiceSpec
}
// ShortID returns the truncated ID of the container (12 characters).
func (c *ServiceContainer) ShortID() string {
return stringid.TruncateID(c.ID)
}
// ServiceID returns the ID of the service this container belongs to.
func (c *ServiceContainer) ServiceID() string {
return c.Config.Labels[LabelServiceID]