mirror of
https://github.com/docker/compose.git
synced 2026-08-28 04:18:05 +00:00
use docker/cli RunExec and RunStart to handle all the interactive/tty/* terminal logic
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
d999c230a5
commit
1d4b4e3c8e
8 changed files with 49 additions and 310 deletions
|
|
@ -62,6 +62,9 @@ func (opts runOptions) apply(project *types.Project) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
target.Tty = !opts.noTty
|
||||
target.StdinOpen = opts.interactive
|
||||
if !opts.servicePorts {
|
||||
target.Ports = []types.ServicePortConfig{}
|
||||
}
|
||||
|
|
@ -207,6 +210,7 @@ func runRun(ctx context.Context, backend api.Service, project *types.Project, op
|
|||
Detach: opts.Detach,
|
||||
AutoRemove: opts.Remove,
|
||||
Tty: !opts.noTty,
|
||||
Interactive: opts.interactive,
|
||||
WorkingDir: opts.workdir,
|
||||
User: opts.user,
|
||||
Environment: opts.environment,
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ func pluginMain() {
|
|||
}
|
||||
|
||||
func main() {
|
||||
if commands.RunningAsStandalone() {
|
||||
if plugin.RunningStandalone() {
|
||||
os.Args = append([]string{"docker"}, compatibility.Convert(os.Args[1:])...)
|
||||
}
|
||||
pluginMain()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue