Merge pull request #26718 from ncdc/add-logs-to-container-attach-options

Add Logs to ContainerAttachOptions
This commit is contained in:
Kenfe-Mickaël Laventure 2016-10-27 13:32:50 -07:00 committed by GitHub
commit 4c7160ed7b
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,9 @@ func (cli *Client) ContainerAttach(ctx context.Context, container string, option
if options.DetachKeys != "" {
query.Set("detachKeys", options.DetachKeys)
}
if options.Logs {
query.Set("logs", "1")
}
headers := map[string][]string{"Content-Type": {"text/plain"}}
return cli.postHijacked(ctx, "/containers/"+container+"/attach", query, nil, headers)