Add Logs to ContainerAttachOptions

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
This commit is contained in:
Andy Goldstein 2016-09-19 14:55:52 -04:00
parent 671fe5c051
commit 27bab36800
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 != "" { 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)