Skip to content

Comments

image/spec: Add Go structs#46363

Merged
vvoland merged 1 commit intomoby:masterfrom
vvoland:image-spec-specs-go
Aug 31, 2023
Merged

image/spec: Add Go structs#46363
vvoland merged 1 commit intomoby:masterfrom
vvoland:image-spec-specs-go

Conversation

@vvoland
Copy link
Contributor

@vvoland vvoland commented Aug 29, 2023

This is an initial effort to add a canonical implementation of the Docker Image spec (application/vnd.docker.container.image.v1+json).

The intent was to share as much of the implementation with the OCI image spec and allow for easy conversion between OCI image and Docker OCI image.

- What I did
Add Go structs describing the image spec which extend the OCI types.

- How I did it

- How to verify it

- Description for the changelog

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

@vvoland vvoland added this to the 25.0.0 milestone Aug 29, 2023
@vvoland vvoland force-pushed the image-spec-specs-go branch from dcff973 to 28820c5 Compare August 29, 2023 13:51
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left one minor nit

@vvoland vvoland force-pushed the image-spec-specs-go branch from 28820c5 to ae52ab5 Compare August 30, 2023 08:36
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -0,0 +1,54 @@
package v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL, I hate the v1 package name, but it's consistent with the OCI-spec's structure, so 🤷‍♂️

@vvoland
Copy link
Contributor Author

vvoland commented Aug 31, 2023

Rebased on master after #46381 was merged.

@thaJeztah @rumpl still LGTY?

Add Go structs describing the image spec which extend the OCI types.

Signed-off-by: Paweł Gronowski <[email protected]>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

it looks like the OCI has some tests to verify backward compatibility; when we're preparing to move the spec out, we should probably consider having something similar as that; https://github.com/opencontainers/image-spec/blob/3131ecd26bfc92a41f3fbf0d13d4d9063f0f36c2/schema/backwards_compatibility_test.go#L27-L45

@vvoland vvoland merged commit 2004f60 into moby:master Aug 31, 2023
@thaJeztah thaJeztah mentioned this pull request Oct 15, 2024
79 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants