-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Add cli build warning about chmod bits on windows #11397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@duglin |
api/client/commands.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for a variable use the string directly.
|
@tiborvass fixed your comments. waiting on @duglin's input on failing TestBuildStderr. I'm still not sure writing to stderr is OK in this case. |
|
I think http://stackoverflow.com/questions/1430956/should-i-output-warnings-to-stderr-or-stdout is a good explanation for why warnings should go to stderr. |
|
@duglin thanks for taking a look and suggesting to modify the test. I will basically say: if windows, all lines in stderr must begin with |
|
Yep - something like that should work since all we really care about is that the builder output doesn't show up there. |
|
@duglin fixed. thanks. |
|
I'm generally okay with this and agree a message should be printed. |
|
@ahmetalpbalkan test are failing |
This shows a warning message about adjusted file/directory permission bits when the `docker build` cli command is executed on windows. Signed-off-by: Ahmet Alp Balkan <[email protected]>
|
LGTM |
|
ping @duglin :D |
|
LGTM |
Add cli build warning about chmod bits on windows
relates to: - moby/moby#11397 - moby/moby#18472 This warning was added in [moby@4a8b3ca] to print a warning when building Linux images from a Windows client. Window's filesystem does not have an "executable" bit, which mean that, for example, copying a shell script to an image during build would lose the executable bit. So for Windows clients, the executable bit would be set on all files, unconditionally. Originally this was detected in the client, which had direct access to the API response headers, but when refactoring the client to use a common library in [moby@535c4c9], this was refactored into a `ImageBuildResponse` wrapper, deconstructing the API response into an `io.Reader` and a string field containing only the `OSType` header. This was the only use and only purpose of the `OSType` field, and now that BuildKit is the default builder for Linux images, this warning didn't get printed unless BuildKit was explicitly disabled. This patch removes the warning, so that we can potentially remove the field, or the `ImageBuildResponse` type altogether. [moby@4a8b3ca]: moby/moby@4a8b3ca [moby@535c4c9]: moby/moby@535c4c9 Signed-off-by: Sebastiaan van Stijn <[email protected]>
This shows a warning message about adjusted file/directory permission bits
when the
docker buildcli command is executed on windows. This will helpWindows users understand the potential security problems.
We should be revisiting this warning when building against a Windows
docker engine. @jhowardmsft
Example:

Signed-off-by: Ahmet Alp Balkan [email protected]
cc: @tianon @tiborvass @ewindisch