mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
image-inspect: remove Config fields that are not part of the image
commitaf0cdc36c7marked these fields as deprecated and to be removed in API v1.47 (which was targeted for v28.0). We shipped v1.47 with the v27.2 release, but did not yet remove the erroneous fields, so the version to deprecate was updated to v1.48 through3df03d8e66This patch removes fields that are not part of the image by replacing the type with the Config struct from the docker image-spec. curl -s --unix-socket /var/run/docker.sock http://localhost/v1.50/images/alpine/json | jq .Config { "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "/bin/sh" ] } curl -s --unix-socket /var/run/docker.sock http://localhost/v1.49/images/alpine/json | jq .Config { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "/bin/sh" ], "Image": "", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": null } Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -24,6 +24,14 @@ keywords: "API, Docker, rcli, REST, documentation"
|
||||
* Deprecated: The `BridgeNfIptables` and `BridgeNfIp6tables` fields in the
|
||||
`GET /info` response were deprecated in API v1.48, and are now omitted
|
||||
in API v1.50.
|
||||
* Deprecated: `GET /images/{name}/json` no longer returns the following `Config`
|
||||
fields; `Hostname`, `Domainname`, `AttachStdin`, `AttachStdout`, `AttachStderr`
|
||||
`Tty`, `OpenStdin`, `StdinOnce`, `Image`, `NetworkDisabled` (already omitted unless set),
|
||||
`MacAddress` (already omitted unless set), `StopTimeout` (already omitted unless set).
|
||||
These additional fields were included in the response due to an implementation
|
||||
detail but not part of the image's Configuration. These fields were marked
|
||||
deprecated in API v1.46, and are now omitted. Older versions of the API still
|
||||
return these fields, but they are always empty.
|
||||
|
||||
## v1.49 API changes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user