-
Notifications
You must be signed in to change notification settings - Fork 0
Add missing properties to the image #121
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
Conversation
daemon/containerd/image.go
Outdated
| "github.com/docker/docker/image" | ||
| "github.com/docker/docker/layer" | ||
| "github.com/docker/go-connections/nat" | ||
| buildkitimage "github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| buildkitimage "github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb" | |
| "github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, fixed, thanks
Including buildkit's custom properties Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
ab394d2 to
f6e199b
Compare
| } | ||
|
|
||
| var ociimage ocispec.Image | ||
| var ociimage dockerfile2llb.Image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused here; so this is using;
https://github.com/moby/buildkit/blob/v0.10/frontend/dockerfile/dockerfile2llb/image.go
That type is effectively deprecated in v0.11 of BuildKit (but not aliased but defined as a duplicate of the type);
https://github.com/moby/buildkit/blob/v0.11.0-rc1/frontend/dockerfile/dockerfile2llb/image.go#L11
The new type is here:
https://github.com/moby/buildkit/blob/v0.11.0-rc1/exporter/containerimage/image/docker_image.go
And, IIUC, it's effectively a fork of the type that is defined in Docker.
So, docker now depends on a fork of itself to define the type?
https://github.com/moby/moby/blob/v23.0.0-beta.1/api/types/container/config.go#L35-L54
Can we fix this, because this looks really weird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last type you linked is an api type, we shouldn't use it for reading things, only for writing to it and sending to the caller.
That being said then moby doesn't have any type that defines a HealthConfig.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But how is the dockerfile2llb type different? That's also an API type; it's the type to export to JSON
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dockerfile2llb type is used to store the image, that's why it's later moved over to the exporter. We should use the same type that is used to save the image when we load it. Then we can convert it to our own types.
This type is the type that we use for the engine API. It should be independent of anything else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put in another way: the dockerfile2llb type is different in a sense that it's a buildkit's type. We have our own for the engine API. They both look the same, but they are not the same
Including buildkit's custom properties