Deprecate non-standard (config) fields in image inspect output #5142
10000
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GET /images/{name}/json
response moby/moby#47941The
Config
field returned by this endpoint (used for "image inspect") returns additional fields that are not part of the image's configuration and not part of the Docker Image Spec and the OCI Image Spec.These additional fields are included in the response, due to an implementation detail, where the api/types.ImageInspec type used for the response is using the container.Config type.
The container.Config type is a superset of the image config, and while the image's Config is used as a template for containers created from the image, the additional fields are set at runtime (from options passed when creating the container) and not taken from the image Config.
These fields are never set (and always return the default value for the type), but are not omitted in the response when left empty. As these fields were not intended to be part of the image configuration response, they are deprecated, and will be removed from the API.
The following fields are currently included in the API response, but are not part of the underlying image's Config, and deprecated:
Hostname
Domainname
AttachStdin
AttachStdout
AttachStderr
Tty
OpenStdin
StdinOnce
Image
NetworkDisabled
(already omitted unless set)MacAddress
(already omitted unless set)StopTimeout
(already omitted unless set)- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)