Docker Community Forums

Share and learn in the Docker community.

A "docker build" command returning a warning as a critical error

(Fpollastrelli) #1

I’m using a script that contains a “docker build” command.
The command is going to upload a Windows content to a docker host running on Linux, to create a Linux image.
When the command completes, the image is actually created and, when run in a container, the container works correctly and as expected.

The only problem is that, during the execution of the “docker build” command, I receive this warning:

“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.”

Although searching about this message on the internet results in this being a simple warning and that it can be ignored without any consequence, this warning is returned with the “error” severity.
Since this command runs inside a longer and more complex script, having this error causes my script to fail.

Is there any way to launch the “docker build” command with some parameters or options to avoid/ignore/suppress this error?


(Jeff Anderson) #2

It looks like this is the source code in question:

Its use of cli.err may be what’s causing your issue. I’d recommend opening a github issue against the docker project: