8000 docs(ContainerExecAttach): reuse ContainerAttach documentation · moby/moby@7528df3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7528df3

Browse files
committed
docs(ContainerExecAttach): reuse ContainerAttach documentation
1 parent b6669f1 commit 7528df3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

client/container_exec.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,18 @@ func (cli *Client) ContainerExecStart(ctx context.Context, execID string, config
5858
// It returns a types.HijackedConnection with the hijacked connection
5959
// and the a reader to get output. It's up to the called to close
6060
// the hijacked connection by calling types.HijackedResponse.Close.
61-
// The Reader contained in the hijacked connection should be read using
62-
// the stdcopy.StdCopy function.
61+
//
62+
// The stream format on the response will be in one of two formats:
63+
//
64+
// If the container is using a TTY, there is only a single stream (stdout), and
65+
// data is copied directly from the container output stream, no extra
66+
// multiplexing or headers.
67+
//
68+
// If the container is *not* using a TTY, streams for stdout and stderr are
69+
// multiplexed.
70+
//
71+
// For more technical informations about the multiplexed stream, check the
72+
// [ContainerAttach] documentation.
6373
func (cli *Client) ContainerExecAttach(ctx context.Context, execID string, config container.ExecAttachOptions) (types.HijackedResponse, error) {
6474
if versions.LessThan(cli.ClientVersion(), "1.42") {
6575
config.ConsoleSize = nil

0 commit comments

Comments
 (0)
0