Docker images can get big and they sometimes are so large that they become hard to manage. As a result of this you may find yourself needing to decrease this size by removing the layers and that’s where this utility I wrote comes in handy.
Basically what it does is Export the Raw Container File System, Import the Raw File System, Create a new Docker Image from that Raw File System, and Exports/Imports the freshly built Image.
These steps are ELABORATE but unfortunately necessary due to the unfortunate lack of functionality in some of the Docker Squash utilities.
If you find yourself at wits end and have tried all the other Docker Squash tools try the one below I’ve written in Bash.