HUB
Sign inSign up

apped/containerexplorer

By apped

•Updated about 1 year ago

Modern container management with real-time logs, interactive shell, file browser, and notifications

Image
0

460

apped/containerexplorer repository overview

⁠Container Explorer

A modern, web-based Docker container management and monitoring tool with real-time logs, interactive shell, file browser, and intelligent notification system.

License Docker Pulls Node Version

⁠Features

⁠Container Management
  • Real-time Container Monitoring - View running, stopped, and paused containers with live status updates
  • Container Actions - Start, stop, restart, pause, unpause, and delete containers
  • Update Management - Check for image updates and rollback to previous versions
  • Network Management - Connect/disconnect containers from networks with visual interface
  • Resource Monitoring - View CPU and memory usage per container
⁠Interactive Tools
  • Live Logs - Real-time log streaming with ANSI color support and word wrap toggle
  • Interactive Shell - Full terminal access with support for bash, sh, powershell, and cmd
  • File Browser - Browse, upload, download, and delete files inside containers
    • Background file operations with job queue
    • Folder download support
    • Multiple file upload
⁠Host Monitoring
  • System Information - OS, architecture, kernel version, and hostname
  • Docker Statistics - Version, API info, container and image counts
  • Resource Usage - CPU and memory utilization charts
  • Disk Usage - Track images and volumes space usage
  • Dangling Resources - Identify and clean up unused images and volumes
⁠Image Management
  • Image Browser - View all Docker images with size and status information
  • Filter by Status - In-use, stopped containers, unused, and dangling images
  • Bulk Operations - Select and prune multiple images at once
  • Smart Pruning - Safely remove unused images with warnings for images with stopped containers
⁠Network Management
  • Network Overview - View all Docker networks with driver and scope information
  • Container Connections - See which containers are connected to each network
  • Network Operations - Create, delete, and manage network connections
⁠Volume Management
  • Volume Browser - List all volumes with usage status
  • Filter by Status - In-use, stopped containers only, or unused volumes
  • Space Management - View volume sizes and prune unused volumes
  • Safe Deletion - Warnings before deleting volumes in use
⁠Notification System
  • Multiple Providers - Support for Telegram, Email, Webhooks, and Slack
  • Event Types:
    • Container status changes (start, stop, restart, die, etc.)
    • Resource alerts (CPU, memory, disk thresholds)
    • Image updates available
    • Host events
  • Flexible Filtering:
    • All containers
    • Specific stacks (Docker Compose projects)
    • Label-based filtering
  • Smart Frequency Control:
    • Cooldown mode - Simple time-based suppression
    • Rate limiting - Max notifications per time window
    • Adaptive backoff - Exponential backoff for repeated events
    • Digest mode - Batch notifications
  • Custom Messages - Template-based messages with variables
  • Notification History - Track sent and failed notifications

⁠Quick Start

docker run -d \
  --name containerexplorer \
  -p 3000:3000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v containerexplorer-data:/app \
  --restart unless-stopped \
  apped/containerexplorer:latest

Access the application at http://localhost:3000

⁠Using Docker Compose

Create a docker-compose.yml file:

services:
  containerexplorer:
    image: apped/containerexplorer:latest
    container_name: containerexplorer
    ports:
      - "3000:3000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - containerexplorer-data:/app
    restart: unless-stopped

volumes:
  containerexplorer-data:

Then run:

docker compose up -d
⁠Manual Installation

Requirements:

  • Node.js 20+
  • npm
  • Docker installed and running

Installation:

# Clone the repository
git clone https://github.com/apped/containerexplorer.git
cd containerexplorer

# Install dependencies
npm install

# Start the application
npm start

Access at http://localhost:3000

⁠Configuration

⁠Environment Variables

The application can be configured using environment variables:

VariableDescriptionDefault
PORTHTTP server port3000
DOCKER_SOCKETDocker socket path/var/run/docker.sock (Linux/Mac)
//./pipe/docker_engine (Windows)
⁠Docker Socket Permissions

The application requires access to the Docker socket to manage containers. Permission requirements vary by platform:

⁠Linux

The Docker socket (/var/run/docker.sock) requires appropriate permissions:

Option 1: Add user to docker group (Recommended)

# Add your user to the docker group
sudo usermod -aG docker $USER

# Log out and back in for changes to take effect
# Or activate the changes immediately
newgrp docker

# Verify access
docker ps

Option 2: Run with elevated privileges

sudo docker run -d \
  --name containerexplorer \
  -p 3000:3000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v containerexplorer-data:/app \
  --restart unless-stopped \
  apped/containerexplorer:latest

Security Note: Adding a user to the docker group grants root-equivalent privileges. For production environments, consider using Docker's socket proxy with access controls.

⁠Windows

Docker Desktop for Windows handles socket permissions automatically:

  1. Install Docker Desktop for Windows⁠
  2. Ensure your user is in the docker-users group (Docker Desktop does this automatically)
  3. Docker Desktop maps /var/run/docker.sock to the Windows named pipe automatically
  4. No additional configuration needed - use the compose file as-is

Verify installation:

docker ps

If you get permission errors, restart Docker Desktop or your computer.

⁠macOS

Docker Desktop for Mac handles socket permissions automatically:

  1. Install Docker Desktop for Mac⁠
  2. Docker Desktop creates and manages /var/run/docker.sock automatically
  3. No additional configuration needed

Verify installation:

docker ps
⁠Troubleshooting Permissions

Linux - "Permission denied" error:

# Check docker group membership
groups

# If 'docker' is not listed, add yourself to the group
sudo usermod -aG docker $USER

# Log out and back in, then verify
docker ps

Windows - "Cannot connect to Docker daemon":

  • Ensure Docker Desktop is running
  • Check Docker Desktop settings → General → "Expose daemon on tcp://localhost:2375 without TLS" is NOT required
  • Restart Docker Desktop
  • Restart your computer if issues persist

macOS - "Cannot connect to Docker daemon":

  • Ensure Docker Desktop is running
  • Check Docker Desktop status in the menu bar
  • Restart Docker Desktop if needed

⁠Usage Guide

⁠Container Management
  1. View Containers - Navigate to the Containers section in the left sidebar
  2. Select Container - Click on any container to view details
  3. Perform Actions - Use the action buttons in the header:
    • ▶️ Start/Resume
    • ⏸️ Pause
    • 🔄 Restart
    • ⏹️ Stop
    • 🗑️ Delete
    • 🔽 Check for Updates
    • ⏮️ Rollback to Previous Version
⁠Viewing Logs
  1. Select a container
  2. Click the Logs tab
  3. Use controls:
    • Toggle word wrap
    • Clear logs
    • Download logs as file
    • Auto-scroll toggle
⁠Interactive Shell
  1. Select a running container
  2. Click the Shell tab
  3. The appropriate shell will be automatically detected and started
  4. Use the terminal normally with full color support
  5. Toggle word wrap as needed
⁠File Browser
  1. Select a container
  2. Click the Files tab
  3. Navigate folders by clicking on them
  4. Operations:
    • Upload - Click upload button to add files (supports multiple files)
    • Download - Click download icon on files or folders
    • Delete - Click delete icon (with confirmation)
    • Background Jobs - Large operations run in background, check Jobs panel
⁠Managing Images
  1. Navigate to the Images section
  2. Filter by status: All, In-Use, Stopped, Unused, Dangling
  3. Select multiple images using checkboxes
  4. Use bulk actions:
    • Prune selected images
    • Prune all unused images
    • View details
⁠Managing Networks
  1. Navigate to the Networks section
  2. View all Docker networks
  3. Click on a network to see connected containers
  4. Manage container connections:
    • Connect containers to networks
    • Disconnect containers from networks
⁠Managing Volumes
  1. Navigate to the Volumes section
  2. Filter by status: All, In-Use, Stopped, Unused
  3. View volume sizes and mount points
  4. Prune unused volumes safely
⁠Setting Up Notifications
⁠1. Configure Providers
  1. Navigate to Notifications section
  2. Click Providers tab
  3. Click Add Provider
  4. Choose provider type:

Telegram:

  • Bot Token: Get from @BotFather on Telegram
  • Chat ID: Get from @userinfobot

Email:

  • SMTP Host: Your email server (e.g., smtp.gmail.com)
  • SMTP Port: Usually 587 or 465
  • Username: Your email address
  • Password: App-specific password recommended
  • From/To addresses

Webhook:

  • URL: Your webhook endpoint
  • Method: GET/POST
  • Headers: Optional custom headers

Slack:

  • Webhook URL: Get from Slack app configuration
  1. Test the provider before saving
⁠2. Create Notification Rules
  1. Click Rules tab
  2. Click Add Rule
  3. Configure rule:

Basic Settings:

  • Name: Descriptive rule name
  • Provider: Choose configured provider
  • Event Type: Container status, Resource alert, Image update, or Host event

Container Filter:

  • All containers
  • Specific stack (Docker Compose project)
  • Specific labels

Conditions:

  • For status events: Select which events (start, stop, die, etc.)
  • For resource alerts: Set CPU/Memory/Disk thresholds

Frequency Control:

  • Cooldown: Simple time-based suppression
  • Rate Limit: Max notifications per time window
  • Adaptive: Exponential backoff for repeated events
  • Digest: Batch notifications

Message Template:

  • Use variables: {containerName}, {event}, {statusEmoji}, etc.
  • Example: {statusEmoji} {containerName} {event}
  1. Enable the rule and save
⁠3. View Notification History
  1. Click History tab
  2. Filter by:
    • Date range
    • Rule
    • Status (sent/failed)
  3. View notification details and troubleshoot issues

⁠Architecture

⁠Technology Stack
  • Backend: Node.js + Express
  • Docker Integration: Dockerode
  • WebSocket: Real-time log streaming and updates
  • Terminal: xterm.js with full ANSI color support
  • UI Framework: DaisyUI + Tailwind CSS
  • Charts: Chart.js for resource monitoring
  • Database: SQLite for notification system
⁠Security Considerations
  • Docker Socket Access: The application requires access to the Docker socket to function
  • Network Isolation: Run in a separate network if security is a concern
  • Read-Only Docker Socket: Not recommended as it limits functionality
  • Authentication: No built-in authentication - use a reverse proxy with auth if exposing publicly

⁠Troubleshooting

⁠Container Shell Not Working

Issue: Shell tab shows errors or doesn't start

Solutions:

  • Ensure container is running
  • Container must have a shell installed (bash, sh, powershell, cmd)
  • Check container logs for errors
⁠File Operations Failing

Issue: Upload/Download not working

Solutions:

  • Check container filesystem permissions
  • Verify path exists in container
  • Large files automatically use background jobs
⁠Notifications Not Sending

Issue: Rules configured but no notifications

Solutions:

  1. Test the provider first using the Test button
  2. Check notification history for error messages
  3. Verify event matches rule conditions
  4. Check frequency settings aren't suppressing notifications
  5. Ensure rule is enabled
⁠High Memory Usage

Issue: Application consuming too much memory

Solutions:

  • Clear browser cache
  • Reduce number of log lines retained
  • Close unused container detail tabs
  • Restart the application
Tag summary
Recent tags
Content type
Image
Digest
sha256:fda533224…
Size
70.6 MB
Last updated
about 1 year ago
docker pull apped/containerexplorer:latest