#Access image config and layers?

1 messages · Page 1 of 1 (latest)

frozen tulip
#

I'm working on a fun side project (hoping to show a demo soon :), but running into a limitation of the Dagger API: namely access to the raw config and layers of a pulled image. The only available option I can see is { container { export } } which is not ideal since it goes through the host filesystem.

Any guidance here? Are there any size/small contributions I could make, or is it all large and complicated?

Thanks!

#

cc @ivory rover @gusty tiger 😇

gusty tiger
frozen tulip
#

I’m not 100% sure what I need yet.. For now I’ll take every lead I can get 🙂

#

This is to implement my docker2dagger adapter

#

So potentially anything a docker client might get from the engine API, I may need

#

In particular I would love to implement image import/export, save/load since pack relies on it

#

also image digests may need the exact imageconfig bytestream? Although in my first experiments the clients don’t seem to check those digests

gusty tiger
#

I see (the adapter will be super cool btw, looking forward to it), I think the devil will probably be in the details and I'm not very familiar with the details of what the docker engine provides. But I can't imagine there would be data that's totally inaccessible; there may be cases where we need to modify buildkit upstream to expose something but that's easier than ever since we can upgrade whenever we want.

#

Also, random thought in case you haven't looked at it already, nerdctl claims to be mostly compatible with the docker cli while using containerd+buildkit as a backend: https://github.com/containerd/nerdctl

#

Wonder if they dealt with the same issue

frozen tulip
#

oh nice!

#

“containerd+” is a major difference though

gusty tiger
frozen tulip
#

I already have a bunch of docker commands running 🤗

#

Big thank you to @tardy marsh for giving me a clean starting point to mock the api, I think you saved me many hours of spelunking ❤️