|
@@ -65,7 +65,7 @@ func NewExecCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
|
}
|
|
|
|
|
|
func runExec(dockerCli *command.DockerCli, opts *execOptions, container string, execCmd []string) error {
|
|
|
- execConfig, err := parseExec(opts, container, execCmd)
|
|
|
+ execConfig, err := parseExec(opts, execCmd)
|
|
|
// just in case the ParseExec does not exit
|
|
|
if container == "" || err != nil {
|
|
|
return cli.StatusError{StatusCode: 1}
|
|
@@ -181,14 +181,13 @@ func getExecExitCode(ctx context.Context, client apiclient.ContainerAPIClient, e
|
|
|
|
|
|
// parseExec parses the specified args for the specified command and generates
|
|
|
// an ExecConfig from it.
|
|
|
-func parseExec(opts *execOptions, container string, execCmd []string) (*types.ExecConfig, error) {
|
|
|
+func parseExec(opts *execOptions, execCmd []string) (*types.ExecConfig, error) {
|
|
|
execConfig := &types.ExecConfig{
|
|
|
User: opts.user,
|
|
|
Privileged: opts.privileged,
|
|
|
Tty: opts.tty,
|
|
|
Cmd: execCmd,
|
|
|
Detach: opts.detach,
|
|
|
- // container is not used here
|
|
|
}
|
|
|
|
|
|
// If -d is not set, attach to everything by default
|