Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Sep 19, 2025

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.

What I did

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@thaJeztah thaJeztah requested a review from a team as a code owner September 19, 2025 17:33
@thaJeztah thaJeztah requested review from glours and ndeloof September 19, 2025 17:33
@thaJeztah thaJeztah closed this Sep 23, 2025
@thaJeztah thaJeztah reopened this Sep 23, 2025
@thaJeztah thaJeztah force-pushed the rm_windows_warning branch 2 times, most recently from 5611d8b to 240bcf9 Compare September 23, 2025 20:36
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]>
@ndeloof ndeloof enabled auto-merge (rebase) September 24, 2025 07:47
@thaJeztah
Copy link
Member Author

@ndeloof this one should be ready to review as well 👍

@ndeloof ndeloof merged commit 4761fd8 into docker:main Sep 24, 2025
26 checks passed
@thaJeztah thaJeztah deleted the rm_windows_warning branch September 24, 2025 16:38
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Oct 10, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker/compose](https://github.com/docker/compose) | minor | `v2.39.4` -> `v2.40.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>docker/compose (docker/compose)</summary>

### [`v2.40.0`](https://github.com/docker/compose/releases/tag/v2.40.0)

[Compare Source](docker/compose@v2.39.4...v2.40.0)

#### What's Changed

##### ✨ Improvements

- publish Compose application as compose.yaml + images by [@&#8203;ndeloof](https://github.com/ndeloof) in [#&#8203;13257](docker/compose#13257)

##### 🐛 Fixes

- resolve secrets based on env var before executing bake by [@&#8203;ndeloof](https://github.com/ndeloof) in [#&#8203;13237](docker/compose#13237)
- pass bake secrets by env by [@&#8203;ndeloof](https://github.com/ndeloof) in [#&#8203;13249](docker/compose#13249)
- escape $ in bake.json as interpolation already has been managed by cpmpose by [@&#8203;ndeloof](https://github.com/ndeloof) in [#&#8203;13259](docker/compose#13259)

##### 🔧  Internal

- pkg/compose: remove uses of deprecated mitchellh/mapstructure module by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13239](docker/compose#13239)
- pkg/watch: remove unused IsWindowsShortReadError by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13052](docker/compose#13052)
- pkg/compose: build: remove permissions warning on Windows by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13236](docker/compose#13236)
- pluginMain: remove uses of DockerCLI.Apply by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13240](docker/compose#13240)
- use containerd registry client by [@&#8203;ndeloof](https://github.com/ndeloof) in [#&#8203;13245](docker/compose#13245)
- provider services: use '--project-name=' notation by [@&#8203;glours](https://github.com/glours) in [#&#8203;13250](docker/compose#13250)
- gha: update test-matrix: remove docker 26.x by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13254](docker/compose#13254)
- pkg/compose: explicitly map AuthConfig fields instead of a direct cast by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13253](docker/compose#13253)
- cmd/compose: fix minor linting issues by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13252](docker/compose#13252)
- use containerd client for OCI operations by [@&#8203;ndeloof](https://github.com/ndeloof) in [#&#8203;13251](docker/compose#13251)

##### ⚙️ Dependencies

- build(deps): bump github.com/docker/docker, docker/cli v28.5.0-rc.1 by [@&#8203;thaJeztah](https://github.com/thaJeztah) in [#&#8203;13241](docker/compose#13241)
- build(deps): bump github.com/docker/docker from 28.5.0-rc.1+incompatible to 28.5.0+incompatible by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;13260](docker/compose#13260)
- build(deps): bump github.com/docker/cli from 28.5.0-rc.1+incompatible to 28.5.0+incompatible by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;13261](docker/compose#13261)

**Full Changelog**: <docker/compose@v2.39.4...v2.40.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzIuNSIsInVwZGF0ZWRJblZlciI6IjQxLjEzMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants