Skip to content

Commit 16dc391

Browse files
committed
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 <[email protected]>
1 parent f164a56 commit 16dc391

6 files changed

Lines changed: 10 additions & 2 deletions

File tree

api/docs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ keywords: "API, Docker, rcli, REST, documentation"
3030
* `GET /images/json` now sets the value of `Containers` field for all images
3131
to the count of containers using the image.
3232
This field was previously always -1.
33+
* Deprecated: The field `NetworkSettings.Bridge` returned by `GET /containers/{id}/json`
34+
is deprecated and will be removed in the next API version.
3335

3436
## v1.50 API changes
3537

api/docs/v1.51.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,8 @@ definitions:
16081608
Bridge:
16091609
description: |
16101610
Name of the default bridge interface when dockerd's --bridge flag is set.
1611+
1612+
Deprecated: This field is only set when the daemon is started with the --bridge flag specified.
16111613
type: "string"
16121614
example: "docker0"
16131615
SandboxID:

api/swagger.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,8 @@ definitions:
16201620
Bridge:
16211621
description: |
16221622
Name of the default bridge interface when dockerd's --bridge flag is set.
1623+
1624+
Deprecated: This field is only set when the daemon is started with the --bridge flag specified.
16231625
type: "string"
16241626
example: "docker0"
16251627
SandboxID:

api/types/container/network_settings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type NetworkSettings struct {
1313

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

vendor/github.com/moby/moby/api/swagger.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moby/moby/api/types/container/network_settings.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)