diff --git a/api/types/container/exec.go b/api/types/container/exec.go index f4b22376ef..e455cd27b2 100644 --- a/api/types/container/exec.go +++ b/api/types/container/exec.go @@ -18,11 +18,13 @@ type ExecOptions struct { AttachStdin bool // Attach the standard input, makes possible user interaction AttachStderr bool // Attach the standard error AttachStdout bool // Attach the standard output - Detach bool // Execute in detach mode DetachKeys string // Escape keys for detach Env []string // Environment variables WorkingDir string // Working directory Cmd []string // Execution commands and args + + // Deprecated: the Detach field is not used, and will be removed in a future release. + Detach bool } // ExecStartOptions is a temp struct used by execStart diff --git a/integration/container/exec_test.go b/integration/container/exec_test.go index 867ffef530..6460a8bd06 100644 --- a/integration/container/exec_test.go +++ b/integration/container/exec_test.go @@ -127,9 +127,8 @@ func TestExecResize(t *testing.T) { cmd = []string{"sleep", "240"} } resp, err := apiClient.ContainerExecCreate(ctx, cID, containertypes.ExecOptions{ - Tty: true, // Windows requires a TTY for the resize to work, otherwise fails with "is not a tty: failed precondition", see https://github.com/moby/moby/pull/48665#issuecomment-2412530345 - Detach: true, - Cmd: cmd, + Tty: true, // Windows requires a TTY for the resize to work, otherwise fails with "is not a tty: failed precondition", see https://github.com/moby/moby/pull/48665#issuecomment-2412530345 + Cmd: cmd, }) assert.NilError(t, err) execID := resp.ID