1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

Merge pull request #6432 from thaJeztah/rm_windows_warning

cli/command/image: build: remove permissions warning on Windows
This commit is contained in:
Austin Vazquez
2025-09-05 09:51:00 -07:00
committed by GitHub

View File

@@ -8,7 +8,6 @@ import (
"io"
"os"
"path/filepath"
"runtime"
"strings"
"github.com/distribution/reference"
@@ -361,16 +360,6 @@ func runBuild(ctx context.Context, dockerCli command.Cli, options buildOptions)
return err
}
// 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.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
// should be just the image ID and we'll print that to stdout.
if options.quiet {