A simple tool to to squash all layers of a docker image into a single tar file.
go install github.com/mheers/docker-image-squash@latest
docker-image-squash <image> <output.tar>
docker run --rm -v $(pwd):/output mheers/docker-image-squash <image> <output.tar>
- remove dependency of
docker
- docker-squash - written in python
- docker-squash - written in go (not maintained)
- no need to install docker
- no need to install python
- no need to run as root