Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 705a1ef

Browse filesBrowse files
committed
api: expose UserlandProxy and UserlandProxyPath in /info API
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
1 parent ed7b7ab commit 705a1ef
Copy full SHA for 705a1ef

6 files changed

+34Lines changed: 34 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎api/docs/CHANGELOG.md‎

Copy file name to clipboardExpand all lines: api/docs/CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ keywords: "API, Docker, rcli, REST, documentation"
1515

1616
## v1.55 API changes
1717

18+
* `GET /info` now includes `UserlandProxy` and `UserlandProxyPath` fields
19+
indicating whether the userland proxy is enabled, and the path to the userland proxy binary if enabled.
20+
1821
## v1.54 API changes
1922

2023
* `GET /images/json` now supports an `identity` query parameter. When set,
Collapse file

‎api/swagger.yaml‎

Copy file name to clipboardExpand all lines: api/swagger.yaml
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7326,6 +7326,21 @@ definitions:
73267326
- "/var/run/cdi"
73277327
Containerd:
73287328
$ref: "#/definitions/ContainerdInfo"
7329+
UserlandProxy:
7330+
description: |
7331+
Indicates if the userland proxy is enabled.
7332+
Added in v1.55.
7333+
type: "boolean"
7334+
x-nullable: true
7335+
example: true
7336+
UserlandProxyPath:
7337+
description: |
7338+
The path to the userland proxy binary.
7339+
This field is only populated if the userland proxy is enabled.
7340+
Added in v1.55.
7341+
type: "string"
7342+
x-nullable: true
7343+
example: "/usr/local/bin/docker-proxy"
73297344

73307345
ContainerdInfo:
73317346
description: |
Collapse file

‎api/types/system/info.go‎

Copy file name to clipboardExpand all lines: api/types/system/info.go
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ type Info struct {
7878

7979
Containerd *ContainerdInfo `json:",omitempty"`
8080

81+
UserlandProxy *bool `json:",omitempty"`
82+
UserlandProxyPath string `json:",omitempty"`
83+
8184
// Warnings contains a slice of warnings that occurred while collecting
8285
// system information. These warnings are intended to be informational
8386
// messages for the user, and are not intended to be parsed / used for
Collapse file

‎daemon/info_unix.go‎

Copy file name to clipboardExpand all lines: daemon/info_unix.go
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ func (daemon *Daemon) fillPlatformInfo(ctx context.Context, v *system.Info, sysI
7878
// Set expected and actual commits to the same value to prevent the client
7979
// showing that the version does not match the "expected" version/commit.
8080

81+
v.UserlandProxy = &cfg.EnableUserlandProxy
82+
if cfg.EnableUserlandProxy {
83+
v.UserlandProxyPath = cfg.UserlandProxyPath
84+
}
85+
8186
if v.CgroupDriver == cgroupNoneDriver {
8287
if v.CgroupVersion == "2" {
8388
v.Warnings = append(v.Warnings, "WARNING: Running in rootless-mode without cgroups. Systemd is required to enable cgroups in rootless-mode.")
Collapse file

‎daemon/server/router/system/system_routes.go‎

Copy file name to clipboardExpand all lines: daemon/server/router/system/system_routes.go
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ func (s *systemRouter) getInfo(ctx context.Context, w http.ResponseWriter, r *ht
122122
// Field introduced in API v1.53.
123123
info.NRI = nil
124124
}
125+
if versions.LessThan(version, "1.55") {
126+
// UserlandProxy fields introduced in API v1.55.
127+
info.UserlandProxy = nil
128+
info.UserlandProxyPath = ""
129+
}
125130
return compat.Wrap(info, legacyOptions...), nil
126131
})
127132

Collapse file

‎vendor/github.com/moby/moby/api/types/system/info.go‎

Copy file name to clipboardExpand all lines: vendor/github.com/moby/moby/api/types/system/info.go
+3Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.