-
Notifications
You must be signed in to change notification settings - Fork 116
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
support docker commit #1370
Comments
This is an idea that I'm very interested in as well. With the stargz-snapshotter configured & running a container that is already formatted in eStargz, I can run a If I'm understanding correctly, you're asking for the newly-committed layer to also be in eStargz format? |
As of now you can do something like the following for converting the commited image but yes it would be great if docker commit natively support this.
|
@ktock, yep! I was just trying out this approach and it sort-of works. Two things I've noticed:
|
Should have mentioned, when I do an inspect on the image I'm trying to push in 2e., no layer has the digest that it's complaining about. |
I've been investigating this more today and I think a docker commit with the stargz-snapshotter is less functional than I originally thought. When I do a docker commit on a container that was launched using this snapshotter, the full container is pulled down as part of the commit process. Is that how it is currently expected to work? I'm not familiar enough with the internals of how a If this is currently working as expected, is it clear how much effort would be required to teach Thanks! |
Thanks. Though I haven't look deeper into docker's implementation of commit, I guess first we need to make sure that creating the uppermost layer tarball from the written container doesn't cause full scan on the rootfs data. IIRC the default layer creation logic (differ) of containerd is that it compares the entier rootfs contents between the old image and the updated container and it can cause large download of the rootfs data. Rather than fully-comparing the rootfs contents, we should create the uppermost layer tarball simply from the overlayfs upperdir written by the container if stargz-snapshotter or other overlayfs-based snapshotter is used (this is how BuildKit achieve layer creation without fully downloading the base image contents). |
will this be supported soon? |
Support packing writable layer of an existing container into sgz blob format. this may be very useful for migrating containers across machines.
See also containerd/nydus-snapshotter#232
The text was updated successfully, but these errors were encountered: