Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Add an option to mark images as deprecated in the Image Schema #1224

Closed
8BitSensei opened this issue Dec 10, 2024 · 3 comments
Closed

Comments

@8BitSensei
Copy link

Over the years I've noticed a lot of public images that people rely on becoming deprecated, as an example, the OpenJDK image in Dockerhub has been marked as deprecated on its Dockerhub page. Unfortunately, there is no way to communicate this to developers who don't bother to check the Dockerhub page, this leads to a situation where I can see dozens of images across my company alone using a deprecated image, and in the worst case, they only learn this when the image disappears during a service restart or scaling.

Is there a way for us to add a field in the Image Schema to mark an image as depreciated so that developer tools can raise this issue to developers? My first thought would be a bool field on the Image index that will default to false/should be interpreted as false if not present, like deprecated:

{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "deprecated": false,
  "manifests": [...],
  "annotations": {...}
}
  • deprecated bool
    This OPTIONAL indicates whether the image should be considered deprecated or not. If this property is not defined, the image should be assumed to not be deprecated.

Is this something that would even be considered in scope for the OCI Image Spec?

@sudo-bmitch
Copy link
Contributor

This could potentially be implemented by registries using the warning header: https://github.com/opencontainers/distribution-spec/blob/main/spec.md#warnings

Note, this header is a recent addition, and support for it in many registries and clients is probably still being implemented.

@sudo-bmitch
Copy link
Contributor

See also #903.

@8BitSensei
Copy link
Author

Thanks for the quick feedback, sorry, I failed to find that other post about deprecation otherwise I wouldn't have bothered asking 🤷

The warning headers look like they'd solve the problem, I'd love to see more tooling integrate them so that they're surfaced to developers more prominently. I'll close this off, again, thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants