-
Notifications
You must be signed in to change notification settings - Fork 109
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
Squashing from layer n to m? #165
Comments
Isn't that what the "--from-layer" arg is for? |
No. The --from-layer argument defines from which layer you squash down into the very first one, you can also see that in the example. My point is the following (using the data from the example):
And now saying I want to squash from
The result would be something like the following:
As you can see, the very first layer |
This is the type of feature it was not covered originally. The idea was that images are structured by |
Hello,
I recently saw some projects using relatively large base images, such as wnameless/oracle-xe-11g, adding additional layers, e.g. by inserting test-data or some specific configuration. As they are frequently used to run tests in CI environments or as local development environments reflecting a production-closer setup, they are committed to some registry. In these cases using docker-squash compresses everything nicely into one layer but creates one huge layer that needs to be pushed to and pulled from the registry, even if only a small configuration was changed in layer X (X>1). In situations like this, it could make sense to squash only from layer n to m and thereby avoid the download of a layer containing the base image over and over again, even though that one didn't change.
Cheers,
Moritz
The text was updated successfully, but these errors were encountered: