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:
Vincent Demeester
2016-04-19 16:56:54 +02:00
parent f4a20799d2
commit 03d17b8c5f
20 changed files with 51 additions and 56 deletions

View File

@ -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
}

View File

@ -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)
}