lxc / distrobuilder

System container image builder for LXC and Incus
https://linuxcontainers.org
Apache License 2.0
548 stars 163 forks source link

Update Docker source to add support for OCI specification instead of docker v2 #823

Open soubinan opened 4 months ago

soubinan commented 4 months ago

Change proposition: Replace Docker-Companion with Skopeo

Hi, this is related to #822

I progressed on my journey with Distrobuilder to convert "docker" images to lxc images. As mentioned in #822, it is perfectly possible when your docker image spec follows the docker V2 specs. If you use the OCI spec its become an issue.

IE: While I was trying to convert the Homarr OCI image into LXC termplate format I received the following error message.

OCI index found, but Accept header does not support OCI indexes

I suspect it is because of Docker-Companion

This package last update has been done 3 years ago and it seems it supports only docker v2 specs...

I suggest to replace this one by Skopeo, more modern and up to date compared to Docker-Companion. And it is an official OCI tool.

I am trying to do it by myself, but I just started to use Distrobuilder two days ago and I am pretty new in Go, so I hoped a more experienced maintainer could do it ^^

I didn't fully got the data transaction point yet (about how Distrobuilder load layers and compose them when downloaded by Docker-Companion), so until I get a full picture of this I hope this implementation could be done by someone else in a next release :)

Thanks in advance

soubinan commented 4 months ago

Just noticed skopeo do not deliver a package.. :face_exhaling:

soubinan commented 4 months ago

Hello,

I have been routed to https://github.com/containers/image by a skopeo maintainer Image is the underlying package used by skopeo copy as he explained in https://github.com/containers/skopeo/issues/2234

So it should be the perfect tool to use with the same benefits as skopeo