mirror of https://github.com/docker/cli.git
Windows to Linux build warning to stdout
Signed-off-by: John Howard <jhoward@microsoft.com> When building a Dockerfile from a Windows client on a Linux daemon, a "security warning" is printed on stderr. Having this warning printed on stderr makes it difficult to distinguish a failed build from one that's succeeding, and the only way to suppress the warning is through the -q option, which also suppresses every output. This change prints the warning on stdout, instead of stderr, to resolve this situation.
This commit is contained in:
parent
f2cac1b6e8
commit
9651fbd197
|
@ -334,7 +334,7 @@ func runBuild(dockerCli *command.DockerCli, options buildOptions) error {
|
|||
// Windows: show error message about modified file permissions if the
|
||||
// daemon isn't running Windows.
|
||||
if response.OSType != "windows" && runtime.GOOS == "windows" && !options.quiet {
|
||||
fmt.Fprintln(dockerCli.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.`)
|
||||
fmt.Fprintln(dockerCli.Out(), `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.`)
|
||||
}
|
||||
|
||||
// Everything worked so if -q was provided the output from the daemon
|
||||
|
|
Loading…
Reference in New Issue