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.
| buildkitimage "github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb" | |
| "github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb" |
Including buildkit's custom properties Signed-off-by: Djordje Lukic <[email protected]>
ab394d2 to
f6e199b
Compare
| } | ||
|
|
||
| var ociimage ocispec.Image | ||
| var ociimage dockerfile2llb.Image |
There was a problem hiding this comment.
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.
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.
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.
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.
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