mirror of
https://github.com/docker/compose.git
synced 2026-06-23 07:01:49 +00:00
Merge pull request #1505 from aiordache/image_cmd
Add `compose images` cmd
This commit is contained in:
commit
eb7732ffec
10 changed files with 279 additions and 0 deletions
|
|
@ -115,3 +115,7 @@ func (c *composeService) Events(ctx context.Context, project string, options com
|
|||
func (c *composeService) Port(ctx context.Context, project string, service string, port int, options compose.PortOptions) (string, int, error) {
|
||||
return "", 0, errdefs.ErrNotImplemented
|
||||
}
|
||||
|
||||
func (c *composeService) Images(ctx context.Context, projectName string, options compose.ImagesOptions) ([]compose.ImageSummary, error) {
|
||||
return nil, errdefs.ErrNotImplemented
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ type Service interface {
|
|||
Events(ctx context.Context, project string, options EventsOptions) error
|
||||
// Port executes the equivalent to a `compose port`
|
||||
Port(ctx context.Context, project string, service string, port int, options PortOptions) (string, int, error)
|
||||
// Images executes the equivalent of a `compose images`
|
||||
Images(ctx context.Context, projectName string, options ImagesOptions) ([]ImageSummary, error)
|
||||
}
|
||||
|
||||
// BuildOptions group options of the Build API
|
||||
|
|
@ -164,6 +166,11 @@ type PullOptions struct {
|
|||
IgnoreFailures bool
|
||||
}
|
||||
|
||||
// ImagesOptions group options of the Images API
|
||||
type ImagesOptions struct {
|
||||
Services []string
|
||||
}
|
||||
|
||||
// KillOptions group options of the Kill API
|
||||
type KillOptions struct {
|
||||
// Signal to send to containers
|
||||
|
|
@ -285,6 +292,15 @@ type ContainerProcSummary struct {
|
|||
Titles []string
|
||||
}
|
||||
|
||||
// ImageSummary holds container image description
|
||||
type ImageSummary struct {
|
||||
ID string
|
||||
ContainerName string
|
||||
Repository string
|
||||
Tag string
|
||||
Size int64
|
||||
}
|
||||
|
||||
// ServiceStatus hold status about a service
|
||||
type ServiceStatus struct {
|
||||
ID string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue