api/t/ctr: deprecate NetworkSettingsBase.Bridge

This field provides little value as it's only set when the daemon is
started with --bridge flag specified, and the inspected container is
connected to the default bridge network.

Unfortunately, there's no equivalent field in NetworkSettings.Networks.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
(cherry picked from commit 16dc39136c)
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
Albin Kerouanton
2025-08-28 13:12:05 +02:00
parent 8fd7525658
commit 0e5ff488de
5 changed files with 9 additions and 1 deletions

View File

@@ -1608,6 +1608,8 @@ definitions:
Bridge:
description: |
Name of the default bridge interface when dockerd's --bridge flag is set.
Deprecated: This field is only set when the daemon is started with the --bridge flag specified.
type: "string"
example: "docker0"
SandboxID:

View File

@@ -14,7 +14,7 @@ type NetworkSettings struct {
// NetworkSettingsBase holds networking state for a container when inspecting it.
type NetworkSettingsBase struct {
Bridge string // Bridge contains the name of the default bridge interface iff it was set through the daemon --bridge flag.
Bridge string // Deprecated: This field is only set when the daemon is started with the --bridge flag specified.
SandboxID string // SandboxID uniquely represents a container's network stack
SandboxKey string // SandboxKey identifies the sandbox
Ports nat.PortMap // Ports is a collection of PortBinding indexed by Port

View File

@@ -1608,6 +1608,8 @@ definitions:
Bridge:
description: |
Name of the default bridge interface when dockerd's --bridge flag is set.
Deprecated: This field is only set when the daemon is started with the --bridge flag specified.
type: "string"
example: "docker0"
SandboxID:

View File

@@ -1608,6 +1608,8 @@ definitions:
Bridge:
description: |
Name of the default bridge interface when dockerd's --bridge flag is set.
Deprecated: This field is only set when the daemon is started with the --bridge flag specified.
type: "string"
example: "docker0"
SandboxID:

View File

@@ -20,6 +20,8 @@ keywords: "API, Docker, rcli, REST, documentation"
* `GET /images/json` now sets the value of `Containers` field for all images
to the count of containers using the image.
This field was previously always -1.
* Deprecated: The field `NetworkSettings.Bridge` returned by `GET /containers/{id}/json`
is deprecated and will be removed in the next API version.
## v1.50 API changes