Merge pull request #19135 from Microsoft/jjh/securitywarning

Windows: Fix security warning regression
This commit is contained in:
Alexander Morozov
2016-01-08 13:55:41 -08:00
2 changed files with 23 additions and 4 deletions

View File

@@ -269,8 +269,9 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
}
}
// Windows: show error message about modified file permissions.
if response.OSType == "windows" {
// Windows: show error message about modified file permissions if the
// daemon isn't running Windows.
if response.OSType != "windows" && runtime.GOOS == "windows" {
fmt.Fprintln(cli.err, `SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.`)
}