Support windows style dockerfile paths for build cmd

Currently TestBuildRenamedDockerfile fails since passing
custom dockerfile paths like:

    docker build -f dir/file .

fails on windows because those are unix paths. Instead, on
windows accept windows style paths like:

    docker build -f dir\file .

and convert them to unix style paths using the helper we
have in `pkg/archive` so that daemon can correctly locate
the path in the context.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
Ahmet Alp Balkan 2015-02-24 19:43:29 -08:00
parent c9b4e665f9
commit 140f461f50
5 changed files with 5 additions and 5 deletions

View file

@ -175,7 +175,7 @@ type tarAppender struct {
// canonicalTarName provides a platform-independent and consistent posix-style
//path for files and directories to be archived regardless of the platform.
func canonicalTarName(name string, isDir bool) (string, error) {
name, err := canonicalTarNameForPath(name)
name, err := CanonicalTarNameForPath(name)
if err != nil {
return "", err
}