mirror of https://github.com/docker/cli.git
Merge pull request #26718 from ncdc/add-logs-to-container-attach-options
Add Logs to ContainerAttachOptions
This commit is contained in:
commit
4c7160ed7b
|
@ -28,6 +28,9 @@ func (cli *Client) ContainerAttach(ctx context.Context, container string, option
|
||||||
if options.DetachKeys != "" {
|
if options.DetachKeys != "" {
|
||||||
query.Set("detachKeys", options.DetachKeys)
|
query.Set("detachKeys", options.DetachKeys)
|
||||||
}
|
}
|
||||||
|
if options.Logs {
|
||||||
|
query.Set("logs", "1")
|
||||||
|
}
|
||||||
|
|
||||||
headers := map[string][]string{"Content-Type": {"text/plain"}}
|
headers := map[string][]string{"Content-Type": {"text/plain"}}
|
||||||
return cli.postHijacked(ctx, "/containers/"+container+"/attach", query, nil, headers)
|
return cli.postHijacked(ctx, "/containers/"+container+"/attach", query, nil, headers)
|
||||||
|
|
Loading…
Reference in New Issue