mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
chore: show container image for the remove container plan operation
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user