cli/command/image: build: remove permissions warning on Windows #6432
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
relates to:
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
ImageBuildResponsewrapper, deconstructing the API response into anio.Readerand a string field containing only theOSTypeheader.This was the only use and only purpose of the
OSTypefield, 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
ImageBuildResponsetype altogether.- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)