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.3.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.3-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docker_analyzer-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 2315d08a6171b03a2d78556ba46165c0456685bd337db0a63e957cdd931f8f56
MD5 767a7ed83db3d34e03a81388d3efe2c4
BLAKE2b-256 2733f919fd1bc50ed40978a92a1bc6cddc5fdd5a2a2f32bd160e6b03d3e0e878

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for docker_analyzer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9c0006b8410b6d4dfdc290ff2556657e75e68998e1072907dfa884aea6c67778
MD5 d109b7408e24011f558b206a269d37f1
BLAKE2b-256 e91d6368741a8acfb6f15d47446a847006b6c38dc1bbd8f6ffacae30e5f55d19

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