Skip to content
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

Preserve first n layers when squashing #193

Open
akhilles opened this issue Apr 11, 2020 · 1 comment
Open

Preserve first n layers when squashing #193

akhilles opened this issue Apr 11, 2020 · 1 comment

Comments

@akhilles
Copy link

Similar to how -f can be used to squash the last n layers, it would be useful to have an argument (such as -p) to preserve the first n layers instead.

For now, this can be done manually with getting the layer count via docker history image:tag | wc -l and then subtracting the number of layers you want to preserve.

@goldmann
Copy link
Owner

Other option would be to allow for negative numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants