4 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
137adde33d client: prepare option-structs for multiple platforms
Some methods currently support a single platform only, but we may
be able to support multiple platforms.

This patch prepares the option-structs for multi-platform support,
but (for now) returning an error if multiple options are provided.

We need a similar check on the daemon-side, but still need to check
on the client, as older daemons will ignore multiple platforms, which
may be unexpected.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-30 18:04:34 +01:00
Paweł Gronowski
51ed1a9a37 client/image_build: Rename output to ImageBuildResult
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-21 19:27:46 -05:00
Sebastiaan van Stijn
82e5d3064a client: ImageBuildResponse: remove OSType field
This field was used in the CLI to produce a warning 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.

The warning was removed in [cli@af65ee4], so we don't have to carry this
field in the new client module going forward.

With the field removed, we can consider the client to return the full
HTTP response again, but leaving that for a follow-up, as we may want
to rewrite these streaming functions altogether.

[moby@4a8b3ca]: 4a8b3cad60
[moby@535c4c9]: 535c4c9a59
[cli@af65ee4]: af65ee4584

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-17 12:41:17 +02:00
Sebastiaan van Stijn
2d1af4e4e4 api/types/build: move build options to client and backend
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 15:57:05 +02:00