Commit Graph

4439 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
51cbd2ed16 api: swagger: remove VirtualSize fields for API > v1.43
The `VirtualSize` field was deprecated in [moby@1261fe6], and omitted / removed
in API v1.44 in [moby@913b0f5]. We should not document the field as part of
those API versions as it no longer exists for those.

[moby@1261fe6]: 1261fe69a3
[moby@913b0f5]: 913b0f51ca

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-30 13:14:06 +02:00
Austin Vazquez
a7edbe8e5f api: remove support for KernelMemoryTCP
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-09-30 10:13:51 +02:00
Austin Vazquez
fb2f8115c8 api: deprecate KernelMemoryTCP support
Starting with kernel v6.12, kernel memory TCP accounting is deprecated for cgroups v1.
Note: kernel memory TCP accounting is not supported by cgroups v2.

See d046ff46ee

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-30 10:13:30 +02:00
Austin Vazquez
5fc0251dc2 Merge pull request #51060 from thaJeztah/rm_email_example
api/docs: remove email field from example auth
2025-09-29 05:33:07 -07:00
Sebastiaan van Stijn
08d014cac8 api/docs: remove email field from example auth
This field was no longer used since Docker 1.11 (API version 1.23)
through [moby@aee260d] and [engine-api@9a9e468] but kept and deprecated
in [engine-api@167efc7], however the docs still used it in an example.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-29 11:29:56 +02:00
Sebastiaan van Stijn
344ab458a1 api/types/registry: remove deprecated AuthConfig.Email field
This field was no longer used since Docker 1.11 (API version 1.23)
through [moby@aee260d] and [engine-api@9a9e468] but kept, and deprecated
in [engine-api@167efc7] with a fix-up in [moby@6cfff7e8803a7].

This patch removes the field so that we don't have to carry it in the
new moby/api module.

[moby@aee260d]: aee260d4eb
[engine-api@9a9e468]: 9a9e468f50
[engine-api@167efc7]: 167efc72bb
[moby@6cfff7e8803a7]: 6cfff7e880

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-29 11:18:39 +02:00
Sebastiaan van Stijn
9b0c78e7d8 Merge pull request #50857 from austinvazquez/add-container-inspect-storage-driver
Add container inspect storage field
2025-09-27 00:49:07 +02:00
Austin Vazquez
efa077848f api/types/storage: define generic Storage type for container inspect
This change defines the generic `Storage` type for use in container inspect responses when using containerd snapshotter backend.

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-09-26 14:21:43 -05:00
Sebastiaan van Stijn
0fb46d08ad api: docs: remove deprecated BridgeNfIptables, BridgeNfIp6tables
The `BridgeNfIptables` and `BridgeNfIp6tables` were removed in API v1.50
in commit 6505d3877c, and only returned in
lower API versions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-23 18:17:25 +02:00
Sebastiaan van Stijn
6d0551e13a api/types/network: CreateRequest: remove deprecated CheckDuplicate field
CheckDuplicate is removed in API v1.44, and no longer used by
daemons supporting that API version (v25.0.0-beta.1 and up)
regardless of the API version used, but it must be set to true
when sent to older daemons (see [moby@78479b1]).

This patch moves adding the field to the client through an ad-hoc struct
so that we don't have to carry the field in the API module.

We can remove this once daemon versions v24.0 and lower are no longer
expected to be used (when Mirantis Container Runtime v23 is EOL).
https://github.com/moby/moby/blob/v2.0.0-beta.0/project/BRANCHES-AND-TAGS.md.

This field was removed from API v1.44 and no longer used by daemons supporting
that API version (v25.0.0-beta.1 and up) regardless of the API version used,
but for older version of the daemon required this option to be set.

[moby@78479b1]: 78479b1915

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-17 14:53:07 +02:00
Sebastiaan van Stijn
4df03a25e7 Merge pull request #50991 from thaJeztah/move_exec_inspect
api/types/container: move ExecInspect type to client
2025-09-17 12:39:48 +02:00
Sebastiaan van Stijn
2b4f5592d2 Merge pull request #50989 from thaJeztah/remove_KernelMemory
remove support for deprecated kernel memory limit
2025-09-17 12:06:18 +02:00
Sebastiaan van Stijn
ff21989215 api/types/container: move ExecInspect type to client
This type was introduced in [moby@3f9f231], at which type no API response
types were defined, and the [`containerRouter.getExecByID`] would return
the daemon's internal [`exec.Config`] type from [`backend.ContainerExecInspect`].

Tracing back history about the discrepancy between the type used by the client
and the actual response type; commit [moby@2a34207] added the missing type in
the API, which was documented as part of the API swagger definition since the
start ([moby@0243936]), and updated in [moby@74cb739], so we can't use the
reduced struct as response type.

[moby@3f9f231]: 3f9f23114f
[moby@2a34207]: 2a342079c6
[`containerRouter.getExecByID`]: 3f9f23114f/api/server/router/container/exec.go (L18-L25)
[`backend.ContainerExecInspect`]: 3f9f23114f/api/server/router/container/backend.go (L18)
[`exec.Config`]: 3f9f23114f/daemon/exec/exec.go (L13-L31)
[moby@0243936]: 0243936d92
[moby@74cb739]: 74cb739766

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-16 16:46:12 +02:00
Sebastiaan van Stijn
da5ca1b746 Merge pull request #50978 from thaJeztah/mv_exec_options
client: move ExecStartOptions, ExecAttachOptions, ExecOptions to client
2025-09-16 15:58:30 +02:00
Sebastiaan van Stijn
c1be6ef5de api/docs: remove KernelMemory option from old API versions
This option is no longer supported by runc, and is deprecated in the kernel.
We removed support for this feature from all API versions, so it's better
to also amend the docs for older API versions.

[kernel v5.4]: https://github.com/torvalds/linux/commit/0158115f702b0ba208ab0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-16 13:26:13 +02:00
Sebastiaan van Stijn
c5991341eb remove support for deprecated kernel memory limit
kernel-memory limits are not supported in cgroups v2, and were obsoleted in
[kernel v5.4], producing a `ENOTSUP` in kernel v5.16. Support for this option
was removed in runc and other runtimes, as various LTS kernels contained a
broken implementation, resulting in unpredictable behavior.

We deprecated this option in [moby@b8ca7de], producing a warning when used,
and actively ignore the option since [moby@0798f5f].

Given that setting this option had no effect in most situations, we should
just remove this option instead of continuing to handle it with the expectation
that a runtime may still support it.

Note that we still support RHEL 8 (kernel 4.18) and RHEL 9 (kernel 5.14). We
no longer build packages for Ubuntu 20.04 (kernel 5.4) and Debian Bullseye 11
(kernel 5.10), which still have an LTS / ESM programme, but for those it would
only impact situations where a runtime is used that still supports it, and
an old API version was used.

[kernel v5.4]: https://github.com/torvalds/linux/commit/0158115f702b0ba208ab0
[moby@b8ca7de]: b8ca7de823
[moby@0798f5f]: 0798f5f5cf

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-16 13:08:36 +02:00
Sebastiaan van Stijn
082b4e8d77 client: move ExecOptions to client
- move api/types/container.ExecOptions to the client
- rename api/types/container.ExecOptions to ExecCreateRequest

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-15 17:37:47 +02:00
Sebastiaan van Stijn
6a642300f0 client: move ExecStartOptions, ExecAttachOptions to client
- move api/types/container.ExecStartOptions to the client
- move api/types/container.ExecAttachOptions to the client
- rename api/types/container.ExecStartOptions to ExecStartRequest

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-15 17:37:43 +02:00
Sebastiaan van Stijn
c600f62c25 api/docs: sync swagger and update changelog
- Update changelog to include mention of the new fields added
  in 3f86797d3f.
- Update changelog to mention removal of the deprecated fields
  in b092c8ca64
- Sync v1.52 swagger docs with the current version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-15 13:27:40 +02:00
Sebastiaan van Stijn
caae209d25 api/types/container: remove deprecated ExecOptions.Detach
This field was deprecated in 0c182d4d57,
which should be included in a 28.x release, but we don't need to carry
it in the new module.

We should also considering duplicating the `ExecOptions` type as a client
option, and renaming it to `ExecCreateRequest`, so that we can decouple
client options from the shape of the request.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-12 10:18:24 +02:00
Sebastiaan van Stijn
1e6e2ceb22 Merge pull request #50846 from akerouanton/drop-deprecated-network-structs
api/t/ctr: drop NetworkSettingsBase, DefaultNetworkSettings
2025-09-11 22:00:06 +02:00
Sebastiaan van Stijn
1c006f247d Merge pull request #50832 from thaJeztah/events_remove_deprecated
api/types/events: Message: remove deprecated Status, ID, and From fields
2025-09-11 21:22:57 +02:00
Sebastiaan van Stijn
183f1517a9 Merge pull request #50915 from thaJeztah/omit_empty_config
api: image inspect: remove temporary backfill for Config fields
2025-09-11 21:21:30 +02:00
Albin Kerouanton
b092c8ca64 api/t/container: drop NetworkSettingsBase
Except Bridge, all fields of NetworkSettingsBase were deprecated in
v1.44, and are actually never set at all.

The Bridge field was deprecated in v1.51 but it's only set when the
container is connected to the default bridge, and when the daemon is
started with the --bridge option set.

So, remove all those fields and do not backfill them for older API
versions.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-11 17:57:42 +02:00
Albin Kerouanton
fc1ff44bc2 api/t/container: drop DefaultNetworkSettings
All the fields in DefaultNetworkSettings were deprecated in Engine v1.9
and scheduled for removal in v17.12. However, they're still return in
all supported API versions.

As we still need to keep backward compatibility for older API versions,
this change leverages the newly added 'compat' package to return these
fields despite being removed from the Go struct.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-11 17:57:42 +02:00
Sebastiaan van Stijn
1b74b3e1ce api/types/events: Message: remove deprecated Status, ID, and From fields
These fields were deprecated in [moby@72f188] (docker v1.10, API v1.22),
with the deprecation message updated to be in the correct format in
[moby@247f47] (docker v23.0).

[moby@72f188]: 72f1881df1
[moby@247f47]: 247f4796d2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-11 10:01:17 +02:00
Sebastiaan van Stijn
3278393cf2 Merge pull request #50949 from thaJeztah/api_update_docs
api/docs: fix events example response
2025-09-11 10:00:37 +02:00
Cory Snider
3f86797d3f api,daemon: report IPAM status for network
On API v1.52 and newer, the GET /networks/{id} endpoint returns
statistics about the IPAM state for the subnets assigned to the network.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-10 11:06:05 -04:00
Sebastiaan van Stijn
139b6464b5 api/docs: fix events example response
Don't include the deprecated `id`, `status`, and `from` fields
in the response; they're no longer part of the API since v1.22
([moby@72f188]).

[moby@72f188]: 72f1881df1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-10 14:37:53 +02:00
Sebastiaan van Stijn
0525ae2aed api: image inspect: remove temporary backfill for Config fields
Commit 4dc961d0e9 (API v1.50) fixed the type
used for Config to point to the correct type, which is the Config struct
from the [Docker image spec] (which embeds the [OCI Image Specification]
type); however, those types use an omitempty, which wasn't documented as
part of the API changes, so f85394dd5d added
a temporary backfill for empty fields.

This removes that backfill for API v1.52 so that empty image config fields
are now omitted.

[OCI Image Specification]: https://github.com/opencontainers/image-spec/blob/v1.1.1/specs-go/v1/config.go#L23-L62
[Docker image spec]: https://github.com/moby/docker-image-spec/blob/v1.3.1/specs-go/v1/image.go#L19-L32

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 22:15:54 +02:00
Sebastiaan van Stijn
7777b86d53 Merge pull request #50910 from thaJeztah/api_docs_image_config
api/docs: remove temporary "full" example for image config
2025-09-05 19:59:19 +02:00
Sebastiaan van Stijn
ec26e71055 Merge pull request #50911 from thaJeztah/api_swagger_sync
api/docs: sync v1.52 docs with latest
2025-09-05 19:58:57 +02:00
Sebastiaan van Stijn
59c2f2d5bc Merge pull request #50907 from thaJeztah/move_build_options
api/types/build: move build options to client and backend
2025-09-05 19:46:25 +02:00
Sebastiaan van Stijn
a1e3a109ee api/docs: sync v1.52 docs with latest
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 19:31:00 +02:00
Sebastiaan van Stijn
0fe1af95f3 api/docs: remove temporary "full" example for image config (v1.50, v1.51)
This example was added in 5e0e34fafd so that
the deprecated fields could be omitted from the example. Those fields were
removed from the swagger in 4dc961d0e9, but
the temporary example was not removed.

This patch removes the example, in favor of the per-field examples, which
were already in place.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 19:22:45 +02:00
Sebastiaan van Stijn
7bfbb6e8ca api/swagger: remove temporary "full" example for image config
This example was added in 5e0e34fafd so that
the deprecated fields could be omitted from the example. Those fields were
removed from the swagger in 4dc961d0e9, but
the temporary example was not removed.

This patch removes the example, in favor of the per-field examples, which
were already in place.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 19:22:42 +02:00
Sebastiaan van Stijn
4e23f5fd62 Merge pull request #50855 from corhere/network-summary-swagger
api/types/network: generate network-inspect struct definitions from Swagger spec
2025-09-05 19:20:43 +02:00
Austin Vazquez
75fd07c365 Merge pull request #50904 from dmcgowan/prepare-api-1.52-beta
Prepare release notes for api/v1.52.0-beta.0
2025-09-05 10:12:19 -07: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
Sebastiaan van Stijn
8b8a3cb14c api/types/image: move LoadResponse to client
It's not the response coming from the API, but a wrapper for a response
reader. We should ultimately remove it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 15:15:42 +02:00
Sebastiaan van Stijn
a064febe14 Merge pull request #50905 from thaJeztah/move_checkpoint_options
api/types/checkpoint: move checkpoint options to client
2025-09-05 13:01:52 +02:00
Sebastiaan van Stijn
432c9e81d1 Merge pull request #50772 from austinvazquez/move-build-cache-prune-options-from-api-to-client
api/types/build: move build cache prune options from api to client
2025-09-05 10:33:23 +02:00
Sebastiaan van Stijn
a8afc2c6fb api/types/checkpoint: move checkpoint options to client
Move the option-types to the client and in some cases create a
copy for the backend. These types are used to construct query-
args, and not marshaled to JSON, and can be replaced with functional
options in the client.

The CreateOptions type was used both as options-struct for the client,
and as struct to marshal/unmarshal the request. For this type, a copy
is created in the Client and a new `checkpoint.CreateRequest` is added
in the API.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 10:20:06 +02:00
Sebastiaan van Stijn
a45639af26 Merge pull request #50897 from thaJeztah/move_container_options
api/types/container: move container options to client
2025-09-05 09:29:56 +02:00
Derek McGowan
d904f3b625 Prepare api/1.52.0-beta releases
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-04 22:54:01 -07:00
Cory Snider
e656f39952 api/t/network: generate more structs from Swagger
Replace hand-rolled struct definitions for api/types/network with
types generated from the Swagger definitions:
  - ConfigReference
  - EndpointResource
  - NetworkingConfig
  - PeerInfo
  - ServiceInfo
  - Task

Add Swagger definitions for ServiceInfo and Task.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-04 19:46:44 -04:00
Cory Snider
ea1c2530da api/t/network: generate Inspect, Summary structs
Replace the hand-rolled Network, Summary and Inspect struct types in
api/types/network with types generated from the Swagger definition.

Disable the generation of all unwanted marshalers and unmarshalers.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-04 19:46:43 -04:00
Austin Vazquez
26e335b647 api/types/build: move CachePruneOptions to client mod
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-09-04 16:33:57 -05:00
Sebastiaan van Stijn
ccf1363680 api/docs: update v1.52 docs with current swagger
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 21:52:11 +02:00
Cory Snider
c208f90796 api/templates: vendor structfield template
Taken verbatim from
eee6eaf67f/generator/templates/structfield.gotmpl
so the alterations from the upstream template can be easily diffed.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-04 15:38:14 -04:00