docker-squash
docker-squash copied to clipboard
Preserve first n layers when squashing
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.
Other option would be to allow for negative numbers.