Skip to main content

A lightweight to tool to analyse and compare Docker images instantly, focusing on layer analysis

Project description

Docker Analyzer CLI

Python publish workflow PyPI version License: MIT

Finally a lightweight tool to inspect and compare Docker images instantly, focusing on layer analysis.

Overview

Docker Analyzer CLI is a Python-based command-line interface designed to analyze and compare Docker images. It provides quick insights into image layers, size optimizations, and differences, making it an essential tool for developers and DevOps engineers.

Features

  • Layer Analysis: Inspect Docker image layers to identify redundancies or inefficiencies.
  • Image Comparison: Compare two images to find shared, duplicated, or non-shared layers.
  • CLI Interface: A powerful and flexible command-line interface.
  • Web GUI Integration: Optionally launch a web-based interface for interactive analysis.
  • Custom Configuration: Configure temporary directories, logging, and output formats.

Installation

Via PIP

pip install docker_analyzer

Via Poetry

poetry add docker_analyzer

CLI Usage

Getting Help

To view all available commands and options:

docker_analyzer --help

Common Commands

Get Temporary Directory

Displays the temporary directory used for file storage:

docker_analyzer get-temp-dir

List Docker Images

Lists all Docker images available on the system:

docker_analyzer list-images

Launch Web GUI

Starts the web-based graphical interface:

docker_analyzer web-gui

Navigate to http://localhost:5002 in your browser to use the GUI.

Comparison Examples

Compare Shared Layers

Identify layers that are shared between two images:

docker_analyzer compare shared-layers python:3.9-slim python:3.9

Compare Duplicated Layers

Find duplicated layers within an image or across two images:

docker_analyzer compare duplicated-layers python:3.9-slim python:3.9

Compare Non-Shared Layers

Identify layers unique to each image:

docker_analyzer compare non-shared-layers python:3.9-slim python:3.9

Compare Total Sizes

Compare the total sizes of two images:

docker_analyzer compare total-sizes python:3.9-slim python:3.9

Development

Running Tests

Run all tests using pytest:

poetry run pytest

Code Style

The project adheres to PEP 8. Check code formatting using black:

poetry run black .

Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a feature branch.
  3. Submit a pull request with a detailed description.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docker_analyzer-0.1.2.tar.gz (36.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docker_analyzer-0.1.2-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

Details for the file docker_analyzer-0.1.2.tar.gz.

File metadata

  • Download URL: docker_analyzer-0.1.2.tar.gz
  • Upload date:
  • Size: 36.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for docker_analyzer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 14f415ef95419475795ae0bcb8a698c25f703667b0062f196207b73b895d4311
MD5 dd47bdaad7589abc646baafe0c6e0ef5
BLAKE2b-256 d624ef3352e541f9ffbab39814dc638d1272937f1c99618ea99460abb21d0980

See more details on using hashes here.

File details

Details for the file docker_analyzer-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for docker_analyzer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 19d2cba647981c9359eae222570bf7edd96cca1477a295d0d9cb553c298e4c5f
MD5 2cf171a843fe74ad442dd9fa5777450f
BLAKE2b-256 d27cccdc11e73c45d3065104fdf3475f1449bcce68ffb24b221480a43888f828

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page