Explorar o código

Fix client-side validation of Dockerfile path

Arguments to `filepath.Rel` were reversed, making all builder tests to
fail.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Arnaud Porterie %!s(int64=10) %!d(string=hai) anos
pai
achega
22e2254c74
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      api/client/commands.go

+ 1 - 1
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
 		}