From 79c7bc906b29c18b37745de10e25c532f20dd5fc Mon Sep 17 00:00:00 2001 From: Arnaud Porterie Date: Mon, 2 Feb 2015 23:42:18 -0800 Subject: [PATCH] Fix client-side validation of Dockerfile path Arguments to `filepath.Rel` were reversed, making all builder tests to fail. Signed-off-by: Arnaud Porterie Upstream-commit: 22e2254c744d1ed2d75f3cdc802e4347727dea6a Component: engine --- components/engine/api/client/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/api/client/commands.go b/components/engine/api/client/commands.go index d60c6d4827..c4ce5e01f3 100644 --- a/components/engine/api/client/commands.go +++ b/components/engine/api/client/commands.go @@ -169,7 +169,7 @@ func (cli *DockerCli) CmdBuild(args ...string) error { } // Now reset the dockerfileName to be relative to the build context - *dockerfileName, err = filepath.Rel(filename, absRoot) + *dockerfileName, err = filepath.Rel(absRoot, filename) if err != nil { return err }