Docker-squash

Latest version: v1.2.2

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

1.0.0rc5

Bug fixes
- In cases, when the image is pulled from a v2 registry and then squashed the metadata was incorrectly prepared, 91

Enhancements
- It's now possible to save a tar and import into Docker daemon after squashing in one run

1.0.0rc4

Bug fixes
- `UnicodeDecodeError: 'utf8' codec can't decode byte 0xc0 in position 4: invalid start byte` should no longer happen on Python 2, 76
- Executing squashing without specifying a name for the target image (`-t`) should not fail, 66
- Better hard links handling, 80

Enhancements
- Tar archive fetched from Docker daemon is no longer put into memory, instead it's fetched in chunks and written to the disk, 81
- Final tar archive is not created in memory, instead it's stored on the disk, 29

1.0.0rc3

- Project was renamed from `docker-scripts` to `docker-squash`
- The `layers` subcommand was removed. This tool purely focuses on the squashing Docker images.
- Better error handling when executing the tool from CLI

1.0.0rc2

Enhancements
- Performance improvements. As part of 63 we investigated and fixed some performance issues. This makes squashing faster even by 40%. It depends of course on the image, but you can expect pretty big performance improvement in any case.

1.0.0rc1

Enhancements
- Add support for Docker `1.10` or newer which introduces new image format
- The `--from-layer` argument can take now numeric value which specifies how many layers should be squashed.
- Temporary directories are now removed in case of failure, see 44.
- Added `--development`, `-d` switch to enable development mode. Currently this enables full stacktraces and does not remove the temporary directories after failure.

Known issues
- In case you want to squash an image containing missing layers (see `docker history IMAGE_ID` to confirm) most probably you'll need to specify numeric value to the `--from-layer` argument which says how many layer you want to squash. It's impossible to reference a missing layer in other way because these layers do not have populated IDs.
- The `layers` sub-command doesn't work (yet)

0.4.4

- When you squash you can now create both - a tarred image **and** load it into Docker. Available only when running from an API, set the `load_image` to True and specify `output_path` too.
- Other small improvements when using the squash tool from API

Page 4 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.