$npx skillfedfor your agent

docker-squash

Docker layer squashing tool

With conditionsPyPI Build ToolsReleased Nov 2024113.8K downloads / moMITSource build

Decision gist · record as of 2026-08-14

sdist only — docker_squash-1.2.2.tar.gz · builds from source
v1.2.2 · released 2024-11-13 · 2 runtime deps: docker, packaging

Yes, if you actively manage Docker images and want to reduce their size and push time. The tool is straightforward and has no known vulnerabilities. However, the aging maintenance status (last release 639 days ago) and high install friction (source distribution, Docker daemon requirement) mean you should verify compatibility with your Docker version before relying on it in production workflows. For one-off optimization tasks, it's low risk; for frequent automation, consider whether a more actively maintained alternative exists.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a running Docker daemon and Docker CLI to be installed on the system; the package itself is a CLI tool, not a library for programmatic use.
  • High install friction due to a source distribution and direct Docker daemon dependency.
  • Maintenance status is aging—last release was 639 days ago, though the repository remains active with recent commits and moderate GitHub stars (958).

License · maintenance · safety

MIT (permissive) — MIT license is permissive and imposes no restrictions on use, modification, or distribution.

last release 2024-11-13 (639 days) · last repo commit 2025-07-04 · 958 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 113,839 downloads/mo, #12,328 on PyPI

Verify before relying

pip install docker-squash
docker-squash -f <layer-id-or-count> -t <new-tag> <image-name>
  • Whether the package works reliably with current Docker versions beyond 1.9
  • Whether Python version support has changed since the description mentions 3.6+
  • Whether the tool handles modern image formats (e.g., OCI) or only Docker v1/v2 formats
Same gist for agents: .md · .json

What it is and what it does

docker-squash is a command-line tool that merges multiple layers in a Docker image into fewer layers. Docker builds create many intermediate layers, some of which may contain temporary files that are deleted in later layers—these unnecessary layers bloat the final image. The tool lets you squash the last N layers, or all layers from a specified layer onward, reducing image size and improving push/load performance.

The tool works by extracting the image, combining the target layers into a single tar archive, and either loading the result back into the Docker daemon or saving it as a tar file. It depends on the docker and packaging libraries and runs as a CLI utility rather than as an importable module.

Use it for

  • Reduce final image size after a multi-stage build by squashing temporary build artifacts into a single layer.
  • Optimize images for faster push to a registry by consolidating many small metadata layers.
  • Simplify image history for cleaner layer inspection and easier debugging of production images.
  • Prepare images for distribution where layer count matters (e.g., embedded or resource-constrained environments).
  • Consolidate base image layers with application layers to reduce the number of independent components.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you actively manage Docker images and want to reduce their size and push time.

The tool is straightforward and has no known vulnerabilities. However, the aging maintenance status (last release 639 days ago) and high install friction (source distribution, Docker daemon requirement) mean you should verify compatibility with your Docker version before relying on it in production workflows. For one-off optimization tasks, it's low risk; for frequent automation, consider whether a more actively maintained alternative exists.

Install

docker-squash on PyPI

Before you install

High install friction due to a source distribution and direct Docker daemon dependency. Maintenance status is aging—last release was 639 days ago, though the repository remains active with recent commits and moderate GitHub stars (958).

Requires a running Docker daemon and Docker CLI to be installed on the system; the package itself is a CLI tool, not a library for programmatic use.

License in practice

MIT license is permissive and imposes no restrictions on use, modification, or distribution.

Quickstart

pip install docker-squash
docker-squash -f <layer-id-or-count> -t <new-tag> <image-name>

Verify before relying

  • Whether the package works reliably with current Docker versions beyond 1.9
  • Whether Python version support has changed since the description mentions 3.6+
  • Whether the tool handles modern image formats (e.g., OCI) or only Docker v1/v2 formats

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionHigh. Source build required
Runtime dependencies
2 packages
dockerpackaging
MaintenanceAging 639 days since the last release
Last repo commit
First released
Downloads113,839 / month, #12,328 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: docker_squash-1.2.2.tar.gz

Tags

Capabilities
docker layer squashingreduce docker image sizecombine docker layersdocker image optimizationdocker layer consolidationminimize docker imagedocker build optimization
Topics
docker-optimizationcli-toolimage-management
PyPI keywords
docker

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “docker layer squashing”

Give your agent the search over MCP, or paste the wish link into any chat.

More Build Tools packages

packaging Worth it
PyPI · Build Tools · released Aug 2026

Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.

Apache-2.0 OR BSD-2-Clausepure Python · 3.9+
2.2Bdownloads / mo
tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
pip Worth it
PyPI · Build Tools · released Aug 2026

pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.

MITpure Python · 3.10+
617.5Mdownloads / mo
hatchling Worth it
PyPI · Python Modules · released Aug 2026

Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.

MITpure Python · 3.10+
484.2Mdownloads / mo
grpcio-tools Worth it
PyPI · Build Tools · released Jul 2026

Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.

Apache-2.0compiled wheel · 3.10+
278.2Mdownloads / mo
pre-commit Worth it
PyPI · Build Tools · released Aug 2026

pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.

Install it if your team needs consistent, automated validation at commit time.

permissive licensepure Python · 3.10+
179.9Mdownloads / mo

See also container-inspector · nvidia-modelopt · tf-slim · psd-tools · azure-containerregistry · lib-layered-config · blend-modes · model-compression-toolkit · binpacking · tox-docker