Update code for latest engine-api
- Update CopyToContainer uses - Use engine-api/types/versions instead of pkg/version Signed-off-by: Vincent Demeester <vincent@sbr.pm> Upstream-commit: 7534f17261d0bb74557ca2f7cd893d5b7b531d49 Component: engine
This commit is contained in:
@ -142,7 +142,7 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, clientFlags *cli.ClientF
|
||||
}
|
||||
customHeaders["User-Agent"] = clientUserAgent()
|
||||
|
||||
verStr := api.DefaultVersion.String()
|
||||
verStr := api.DefaultVersion
|
||||
if tmpStr := os.Getenv("DOCKER_API_VERSION"); tmpStr != "" {
|
||||
verStr = tmpStr
|
||||
}
|
||||
|
||||
@ -288,11 +288,8 @@ func (cli *DockerCli) copyToContainer(srcPath, dstContainer, dstPath string, cpP
|
||||
}
|
||||
|
||||
options := types.CopyToContainerOptions{
|
||||
ContainerID: dstContainer,
|
||||
Path: resolvedDstPath,
|
||||
Content: content,
|
||||
AllowOverwriteDirWithFile: false,
|
||||
}
|
||||
|
||||
return cli.client.CopyToContainer(context.Background(), options)
|
||||
return cli.client.CopyToContainer(context.Background(), dstContainer, resolvedDstPath, content, options)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user