Merge pull request #28923 from erikh/fix-copy

Fix copy API (`docker cp`, etc) uid/gid handling
This commit is contained in:
Anusha Ragunathan 2017-04-12 08:21:17 -07:00 committed by GitHub
commit 5084e4d6b4
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,10 @@ func (cli *Client) CopyToContainer(ctx context.Context, container, path string,
query.Set("noOverwriteDirNonDir", "true") query.Set("noOverwriteDirNonDir", "true")
} }
if options.CopyUIDGID {
query.Set("copyUIDGID", "true")
}
apiPath := fmt.Sprintf("/containers/%s/archive", container) apiPath := fmt.Sprintf("/containers/%s/archive", container)
response, err := cli.putRaw(ctx, apiPath, query, content, nil) response, err := cli.putRaw(ctx, apiPath, query, content, nil)