Skip to main content

A powerful desktop tool for monitoring and managing Docker containers

Project description

docker-monitor-manager 🐳📊

A small, native desktop tool for monitoring and managing Docker containers, written in Python with Tkinter.

This repository provides a GUI application and helpful CLI tools for Docker management. It exposes the following console entry points when installed:

  • docker-monitor-manager / dmm - Desktop GUI application
  • dmm-config - System configuration helper
  • dmm-doctor - Health checker with guided fixes
  • dmm-cleanup - Docker maintenance and cleanup helper
  • dmm-test - Test environment creator
  • dmm-setup - Post-installation setup (desktop entry & icons)
  • dmm-update - Update to the latest version from PyPI
  • dmm-help - Display help and documentation for all CLI tools
  • dmm-uninstall - Complete uninstaller

What it does

  • Live container stats (CPU% and RAM%) shown in a native Tkinter window.
  • Auto-scaling behaviour (creates lightweight clones of overloaded containers, and manages clones in a simple policy).
  • Basic container management actions from the UI (stop, pause, restart, remove, etc.).
  • Embedded, restricted terminal for running safe docker ... commands from the GUI.
  • Application log view for real-time monitoring of what the app is doing.
  • Comprehensive CLI tools for system configuration, health checking, and maintenance.
  • Built-in help system (dmm-help) that provides detailed documentation for all commands.
  • Auto-update functionality (dmm-update) to easily upgrade to the latest version.
  • A guided CLI helper (dmm-doctor) that diagnoses Docker/AppArmor issues and reclaims memory held by orphaned containers when safe.

Features ✨

  • 📈 Live container stats (CPU%, RAM%)
  • Auto-scale containers when resource limits are exceeded
  • ⏯️ Manage containers: Stop, Pause, Unpause, Restart, and Remove containers directly from the UI.
  • 🎛️ Global controls: Apply actions to all containers at once.
  • 🖥️ Embedded Terminal: A secure terminal for running docker commands.
  • 📝 Live Application Logs: See what the monitor is doing in real-time.
  • ⚙️ Dynamic Configuration: Adjust CPU/RAM limits and other settings without restarting the app.
  • 🔄 Auto-Update: Update to the latest version with a single command (dmm-update)
  • 📚 Comprehensive Help: Built-in help system for all CLI tools (dmm-help)
  • 🏥 Health Checker: Automatic diagnosis and fixing of common Docker issues (dmm-doctor)
  • 🧪 Test Environment: Easily create test containers for verification (dmm-test)

Installation 🚀

Option 1: Install from PyPI (if published)

pip install docker-monitor-manager

Option 2: Install with pipx

sudo apt install pipx   # (or install pipx by your OS method)
pipx install docker-monitor-manager

Option 3: Install from source (local)

git clone https://github.com/amir-khoshdel-louyeh/docker-monitor-manager.git
cd docker-monitor-manager
pip install .

⚠️ Important: After installation, run the setup command:

dmm-setup

This installs the desktop entry and icons, making the app searchable in your application menu.

Prerequisites

  • Python 3.8+
  • Docker Engine (installed and running)
  • On Linux, to use Docker without sudo, add your user to the docker group:
sudo usermod -aG docker $USER
# then log out and back in, or run:
newgrp docker

Verify membership (after restarting your system or logging out/in):

getent group docker

If you see permission denied errors when accessing Docker, make sure the Docker daemon is running and your user has permission (see Troubleshooting below).


Usage

After installation, first run the setup:

dmm-setup

Then you can run the GUI:

docker-monitor-manager
# or
dmm

Or search for "Docker Monitor Manager" in your application menu!

CLI Tools

📚 Get help and documentation:

dmm-help           # show all available commands
dmm-help <command> # show detailed help for a specific command
dmm-help doctor    # example: get help about dmm-doctor

🔄 Update to the latest version:

dmm-update         # update from PyPI

🏥 Check system health and get guidance:

dmm-doctor         # diagnose issues and get fix guidance

⚙️ Configure Docker installation:

dmm-config         # runs helper actions automatically when required

🧪 Create test environment:

dmm-test           # create test containers
dmm-test status    # check status
dmm-test cleanup   # remove test containers

🗑️ Uninstall completely:

dmm-uninstall      # remove application, icons, and desktop entries

---

## All Available Commands

| Command | Description | Example |
|---------|-------------|---------|
| `dmm` / `docker-monitor-manager` | Launch the GUI application | `dmm` |
| `dmm-help` | Show help for all commands | `dmm-help` |
| `dmm-help <command>` | Show detailed help for a command | `dmm-help doctor` |
| `dmm-update` | Update to the latest version | `dmm-update` |
| `dmm-setup` | Run post-installation setup | `dmm-setup` |
| `dmm-doctor` | Check system health | `dmm-doctor` |
| `dmm-cleanup` | Prune Docker resources | `dmm-cleanup` |
| `dmm-config` | Configure Docker installation | `dmm-config` |
| `dmm-test` | Create test containers | `dmm-test` |
| `dmm-uninstall` | Uninstall the application | `dmm-uninstall` |

**Quick Command Reference:**
```bash
dmm-help           # Get help anytime
dmm-update         # Stay up to date
dmm-doctor         # Review diagnostics and suggestions
dmm-cleanup        # Prune unused resources
dmm                # Run the application

Quick Start

First-time setup:

# 1. Install the package
pip install docker-monitor-manager

# 2. Run post-installation setup
dmm-setup

# 3. Check system health
dmm-doctor

# 4. (Optional) Create test environment
dmm-test

# 5. (Optional) Cleanup unused Docker resources
dmm-cleanup

# 6. Launch the application
dmm

To get help anytime:

dmm-help           # show all commands
dmm-help <command> # detailed help for a specific command

CLI Tools Overview

📚 dmm-help

Display comprehensive help and documentation for all CLI tools.

Features:

  • Shows overview of all available commands
  • Provides detailed help for specific commands
  • Includes usage examples and explanations
  • Beautiful colored terminal output

Usage:

dmm-help           # show main help screen
dmm-help doctor    # detailed help for dmm-doctor
dmm-help update    # detailed help for dmm-update
dmm-help config    # detailed help for dmm-config

🔄 dmm-update

Update Docker Monitor Manager to the latest version from PyPI.

Features:

  • Checks current installed version
  • Downloads and installs the latest version
  • Automatically runs post-installation setup
  • Preserves your configuration and settings
  • Supports force reinstall option

Usage:

dmm-update         # update to latest version

🏥 dmm-doctor

Health checker that diagnoses common Docker issues, suggests fixes, and frees memory from orphaned container shims when possible.

Checks:

  • ✓ Docker installation
  • ✓ Docker service status
  • ✓ Docker daemon connectivity
  • ✓ User permissions
  • ✓ Docker socket accessibility
  • ✓ Network connectivity
  • ✓ System resources
  • ✓ Orphaned container shims (reclaims memory when safe)

Usage:

dmm-doctor         # run diagnostics and receive guidance

🧹 dmm-cleanup

Prune unused Docker resources and reclaim memory from stray container shims.

Tasks:

  • Removes stopped containers (docker container prune)
  • Removes dangling images (docker image prune)
  • Removes unused networks (docker network prune)
  • Removes unused volumes (docker volume prune)
  • Terminates orphaned containerd shim processes to free RAM

Usage:

dmm-cleanup        # run all cleanup tasks

🧪 dmm-test

Create test Docker containers for verifying the application works correctly.

Creates:

  • Normal containers (nginx, redis, postgres)
  • CPU stress containers (for testing resource monitoring)
  • Memory stress containers (for testing memory limits)
  • Cloneable containers (for testing clone functionality)
  • Stopped containers (for testing restart)

Usage:

dmm-test           # create all test containers
dmm-test status    # show container status
dmm-test cleanup   # remove all test containers

⚙️ dmm-config

Interactive system configuration helper.

Features:

  • Detects and installs Docker
  • Configures AppArmor/SELinux
  • Sets up proper permissions

Usage:

dmm-config         # run configuration helper

🗑️ dmm-uninstall

Complete uninstaller that removes all application files and settings.

Removes:

  • Python package (automatically detects pip, pip3, or pipx installation)
  • Desktop entry (.desktop file)
  • All icons (Linux/Windows/macOS)
  • Configuration files (optional)

Supports:

  • ✅ pip install
  • ✅ pip3 install
  • ✅ pipx install
  • ✅ Development mode (pip install -e .)
  • ✅ User install (pip install --user)

Usage:

dmm-uninstall      # interactive uninstall (auto-detects installation method)

---

## dmm-config — quick reference

`dmm-config` is a small CLI tool included in the package. It performs checks and applies helper actions needed for this app to talk to Docker.

What it does
- Detects whether `docker` is available on PATH (`docker --version`).
- On Linux it can attempt to install Docker via the distro package manager (or use the official install script) and installs AppArmor utilities when appropriate.
- If `/etc/apparmor.d/docker` exists, it switches the profile to `complain` and `disable` using `aa-complain` / `aa-disable`.

Security & behavior
- The helper performs required actions automatically and prints the commands it runs. Ensure you understand the changes before executing it on shared systems.

Manual AppArmor commands (Debian/Ubuntu example)
```bash
sudo apt-get update
sudo apt-get install apparmor-utils
sudo aa-status
sudo aa-complain /etc/apparmor.d/docker
sudo aa-disable /etc/apparmor.d/docker

Troubleshooting (common)

Need help? Run dmm-help to see all available commands and their usage.

  • "permission denied" when accessing Docker:

    • Run dmm-doctor to diagnose the issue and follow the suggested steps.
    • Or manually: Ensure the Docker daemon is running: sudo systemctl start docker (or use your distro's service manager).
    • Add your user to the docker group and re-login: sudo usermod -aG docker $USER then logout/login or newgrp docker.
    • If AppArmor is interfering, use dmm-config to inspect and optionally change the Docker AppArmor profile.
  • Application not working correctly:

    • Run dmm-doctor to check for common issues.
    • Run dmm-test to create test containers and verify functionality.
  • Want to update to the latest version:

    • Simply run dmm-update to download and install the latest version from PyPI.

Developer / Maintainer notes

  • Quick syntax check (compile-only):
python3 -m py_compile docker_monitor/*.py
  • Quick import test:
python3 -c "import docker_monitor.main as m; print('OK')"
  • Build distributions (wheel & sdist):
pip install build
python -m build

Source layout and important files

  • docker_monitor/__init__.py — package metadata (version, author).
  • docker_monitor/main.py — main GUI application and console entry point.
  • docker_monitor/cli/ — CLI tools directory:
    • config.pydmm-config system configuration helper.
      • doctor.pydmm-doctor health checker with guided fixes.
    • test.pydmm-test test environment creator.
    • setup.pydmm-setup post-installation setup.
    • update.pydmm-update auto-updater.
    • help.pydmm-help help and documentation system.
    • uninstall.pydmm-uninstall complete uninstaller.
  • docker_monitor/gui/ — GUI components (app, managers, widgets).
  • docker_monitor/utils/ — Utility modules (Docker utils, buffer handler).
  • requirements.txt / pyproject.toml — declare runtime dependencies (notably docker, Pillow, and psutil).

Packaging & platform notes

  • Windows: the GUI attempts to use generated .ico if available (requires Pillow to generate icons).
  • macOS: packaging as a .app (py2app) is recommended for a native experience and to generate .icns correctly.
  • Linux: Tkinter PhotoImage PNGs usually work for in-window icons.

Security notes

  • The embedded terminal widget only allows commands that start with docker — arbitrary shell commands are rejected by design. the only exeption is clear command.
  • dmm-config may run package-manager commands with sudo when requested by the user. It is intentionally conservative and prompts before making changes.

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_monitor_manager-1.2.7.tar.gz (211.7 kB view details)

Uploaded Source

Built Distribution

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

docker_monitor_manager-1.2.7-py3-none-any.whl (226.6 kB view details)

Uploaded Python 3

File details

Details for the file docker_monitor_manager-1.2.7.tar.gz.

File metadata

  • Download URL: docker_monitor_manager-1.2.7.tar.gz
  • Upload date:
  • Size: 211.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for docker_monitor_manager-1.2.7.tar.gz
Algorithm Hash digest
SHA256 5f3c30e3e1738074934881eb9fa9402fe3e0c42d85a5fb833f2839fbde85f441
MD5 bb37c7cd583ade486f927ec1f65601dd
BLAKE2b-256 ab0dfdb12c345412352e4236dda8f0aeabb9d85c7ccd6a47ba11b8ee20c0d2aa

See more details on using hashes here.

File details

Details for the file docker_monitor_manager-1.2.7-py3-none-any.whl.

File metadata

File hashes

Hashes for docker_monitor_manager-1.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 27bde5f83046ba5ec93c871ec31dca3ba73f307431348d077f1374189cb50863
MD5 4cf0e74add114fcec181e4221e154d3c
BLAKE2b-256 de06a1bd94054fdca3c3705d0e434fb0f9b9a1f6d7df810760b1da4bfbc1cade

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