docker-squash

Squash Docker images into a single layer to reduce size

brewmacoslinux
Try with needOr install directly
Source

About

Docker image squashing tool

Commands

docker-squash

Examples

Squash a Docker image and save it with a new tag$ docker-squash -i myimage:latest -o myimage:squashed
Squash layers from a specific layer onward$ docker-squash -i myimage:latest -o myimage:squashed -f layer_id
Squash an image and push to a registry$ docker-squash -i myimage:latest -o registry.example.com/myimage:squashed