Przeglądaj źródła

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 10 lat temu
rodzic
commit
22e2254c74
1 zmienionych plików z 1 dodań i 1 usunięć
  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
 		// 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 {
 		if err != nil {
 			return err
 			return err
 		}
 		}