GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Deprecate non-standard (config) fields in image inspect output by thaJeztah · Pull Request #5142 · docker/cli

Conversation

@thaJeztah

@thaJeztah thaJeztah commented Jun 11, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • relates to api: deprecate erroneous Config fields in GET /images/{name}/json response moby/moby#47941

The 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

Deprecate non-standard (config) fields in image inspect output

The `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 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)

[Docker image spec]: https://github.com/moby/docker-image-spec/blob/v1.3.1/specs-go/v1/image.go#L19-L32
[OCI Image Spec]: https://github.com/opencontainers/image-spec/blob/v1.1.0/specs-go/v1/config.go#L24-L62

- A picture of a cute animal (not mandatory but encouraged)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@thaJeztah
Deprecate non-standard (config) fields in image inspect output
b79d684
The `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)

[Docker image spec]: https://github.com/moby/docker-image-spec/blob/v1.3.1/specs-go/v1/image.go#L19-L32
[OCI Image Spec]: https://github.com/opencontainers/image-spec/blob/v1.1.0/specs-go/v1/config.go#L24-L62
[api/types.ImageInspec]: https://github.com/moby/moby/blob/v26.1.4/api/types/types.go#L87-L104
[container.Config]: https://github.com/moby/moby/blob/v26.1.4/api/types/container/config.go#L47-L82

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added impact/changelog impact/deprecation status/3-docs-review labels Jun 11, 2024
@thaJeztah thaJeztah added this to the 27.0.0 milestone Jun 11, 2024
@thaJeztah thaJeztah self-assigned this Jun 11, 2024
@thaJeztah
thaJeztah requested a review from a team as a code owner June 11, 2024 15:10
@thaJeztah
thaJeztah requested a review from dvdksn June 11, 2024 15:10
@thaJeztah thaJeztah added the area/api label Jun 11, 2024
vvoland
vvoland approved these changes Jun 11, 2024
View reviewed changes
@codecov-commenter

codecov-commenter commented Jun 11, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.79%. Comparing base (0022fe7) to head (b79d684).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5142      +/-   ##
==========================================
- Coverage   61.82%   61.79%   -0.03%     
==========================================
  Files         298      295       -3     
  Lines       20730    20725       -5     
==========================================
- Hits        12817    12808       -9     
- Misses       7000     7002       +2     
- Partials      913      915       +2     
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Benehiko
Benehiko approved these changes Jun 12, 2024
View reviewed changes
@thaJeztah

thaJeztah commented Jun 12, 2024

Copy link
Copy Markdown
Member Author

@dvdksn this LGTY?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah

thaJeztah commented Jun 12, 2024

Copy link
Copy Markdown
Member Author

Let me bring this one in; but happy to make follow-up changes

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah
thaJeztah merged commit 1671ee8 into docker:master Jun 12, 2024
@thaJeztah
thaJeztah deleted the deprecate_image_config_fields branch June 12, 2024 11:53
This was referenced Sep 9, 2024
api/swagger: update deprecation version for erroneous fields moby/moby#48446
Merged
image-inspect: remove Config fields that are not part of the image moby/moby#48457
Merged
[27.x backport] api/swagger: update deprecation version for erroneous fields moby/moby#48470
Merged
@thaJeztah thaJeztah mentioned this pull request May 27, 2025
docs: deprecated: update status for non-standard fields in image inspect #6111
Merged
This was referenced Aug 3, 2026
fix(deploy): 최신 Docker 이미지 강제 반영 및 배포 파일 정리 KB-PJT/moca-be#41
Merged
docs: add TrueNAS Antigravity validation runbook eXPerience83/remote-dev-containers#79
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vvoland vvoland vvoland approved these changes
@Benehiko Benehiko Benehiko approved these changes
@dvdksn dvdksn Awaiting requested review from dvdksn

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@thaJeztah thaJeztah

Labels

area/api impact/changelog impact/deprecation status/3-docs-review

Projects

None yet

Milestone

27.0.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@thaJeztah @codecov-commenter @vvoland @Benehiko
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.