-
Notifications
You must be signed in to change notification settings - Fork 3
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
Squash some layers #70
Comments
I would agree as the default behaviour is to squash (non-overlays) and leaving the overlay, purposed here:
makes sense over the alternates (more work yes), but then using |
Think it might make sense to generalize things a bit... was going to write something up but figure it might be simpler to show an example. Would this do what you need? #71 |
I think that would work, yeah... but I'm not entirely convinced about the generalization for the following reasons...
Having said that... it's not a big deal. If you prefer the selector approach then it'll work for Singularity 👍 |
Those are good points, I agree. I'd like to keep the building blocks fairly generic to support future needs, but there's no reason that can't be done with the squash API you suggest. I'll give that a re-work shortly, thanks! |
In SingularityCE, we have added the ability to create a writable overlay in an OCI-SIF file. A writable overlay is an ext3 filesystem image, as an additional final layer on the OCI image encapsulated in the OCI-SIF.
We can push an OCI-SIF, containing an overlay, into an OCI registy. We then have a remote image with N original layers, plus a final ext3 layer - the writable overlay. Usually an OCI-SIF will have a single non-overlay layer, since we squash OCI images by default on a
singularity pull --oci
. However, we can optionally create a multi-layer OCI-SIF, and if an overlay is added and the resulting image pushed, we then have this in the registry:On
singularity pull
of this image from the registry, the default in SingularityCE is to squash all layers. We use ocitools mutate.Squash for this. However, the squash will fail here, because we don't have the ability to squash an ext3 layer.Users would probably expect that the non-overlay layers are squashed, but the overlay layer is preserved as a writable overlay on pull (because writable overlays travel with the image, as-is, in native mode)
This requires the ability to squash a subset of layers, e.g. implement:
Any thoughts on this @tri-adam @wobito ?
The corresponding SingularityCE issue is sylabs/singularity#3135
We could, alternatively do things like....
--keep-layers
in SingularityCE, and fail otherwise.--keep-layers
in SingularityCE when pulling an image that has an overlay. This means an image with an overlay is never squashed on pull.mutate.Squash
so that it can squash ext3 also... which would mean callingmutate.Squash
turns an image with a writable overlay into a single-layer r/o image, with the overlay content present.The text was updated successfully, but these errors were encountered: