mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-07 05:39:01 +00:00
chore: show container image for the remove container plan operation
This commit is contained in:
1 parent
882f2f5d03
commit
6e4439bf49
3 files changed
+34
-30
No files matched your search
@@ -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