mirror of
https://github.com/docker/compose.git
synced 2026-08-04 14:47:40 +00:00
Merge pull request #1306 from aiordache/compose_exec_cmd
Add `compose exec` command
This commit is contained in:
commit
5e7203dbe4
10 changed files with 284 additions and 0 deletions
|
|
@ -87,3 +87,7 @@ func (c *composeService) RunOneOffContainer(ctx context.Context, project *types.
|
|||
func (c *composeService) Remove(ctx context.Context, project *types.Project, options compose.RemoveOptions) ([]string, error) {
|
||||
return nil, errdefs.ErrNotImplemented
|
||||
}
|
||||
|
||||
func (c *composeService) Exec(ctx context.Context, project *types.Project, opts compose.RunOptions) error {
|
||||
return errdefs.ErrNotImplemented
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ type Service interface {
|
|||
RunOneOffContainer(ctx context.Context, project *types.Project, opts RunOptions) (int, error)
|
||||
// Remove executes the equivalent to a `compose rm`
|
||||
Remove(ctx context.Context, project *types.Project, options RemoveOptions) ([]string, error)
|
||||
// Exec executes a command in a running service container
|
||||
Exec(ctx context.Context, project *types.Project, opts RunOptions) error
|
||||
}
|
||||
|
||||
// CreateOptions group options of the Create API
|
||||
|
|
@ -126,6 +128,14 @@ type RunOptions struct {
|
|||
AutoRemove bool
|
||||
Writer io.Writer
|
||||
Reader io.Reader
|
||||
|
||||
// used by exec
|
||||
Tty bool
|
||||
WorkingDir string
|
||||
User string
|
||||
Environment []string
|
||||
Privileged bool
|
||||
Index int
|
||||
}
|
||||
|
||||
// PsOptions group options of the Ps API
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue