Skip to content

Plugin Container Status

Dwi Elfianto edited this page Dec 6, 2025 · 3 revisions

Enhanced container status display with brief table format and detailed verbose output - a better alternative to docker ps.

Overview

Plugin: docker-pps (Pretty PS)
Location: ~/.docker/cli-plugins/docker-pps

docker pps provides two output modes:

  • Brief: Clean table format with essential information
  • Verbose: Detailed per-container information including labels, mounts, and full commands

Installation

sudo cp /srv/compose/docker/cli-plugins/docker-pps ~/.docker/cli-plugins/
chmod +x ~/.docker/cli-plugins/docker-pps
docker pps --help

Usage

Brief Mode (Default)

# Show all containers (default)
docker pps

# Show only running containers
docker pps --running

# Brief mode explicitly
docker pps --brief

Output:

CONTAINER NAME    STATUS              PORTS
traefik           Up 2 hours         0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp
mongodb           Up 2 hours         27017/tcp
pgvector          Up 2 hours         5432/tcp
ollama            Up 1 hour          11434/tcp

Verbose Mode

# Verbose for all containers
docker pps --verbose
docker pps -v

# Verbose for specific container
docker pps -v traefik
docker pps --verbose mongodb

Output:

==========================================
Container: traefik
------------------------------------------
ID: abc123def456
Image: traefik:latest
Status: Up 2 hours
Command: /entrypoint.sh traefik
Created: 2024-01-15 10:30:45
Uptime: 2 hours

Ports:
  - 0.0.0.0:80->80/tcp
  - 0.0.0.0:443->443/tcp
  - 8080/tcp

Networks:
  - proxy (172.20.0.5)
  - bridge

Size: 150MB (virtual 200MB)

Mounts:
  - /var/run/docker.sock -> /var/run/docker.sock (rw)
  - traefik-acme -> /acme.json (rw)

Labels:
  - com.docker.compose.project: panel
  - com.docker.compose.service: traefik
  - traefik.enable: true
  - traefik.http.routers.dashboard.rule: Host(`traefik.example.com`)
  ...
==========================================

Options

--brief, -b          Brief table format (default)
--verbose, -v        Detailed information per container
--running, -r        Show only running containers
-h, --help           Show help message

Use Cases

Quick Status Check

# Check what's running
docker pps --running

# All containers
docker pps

Debugging Container Issues

# Get detailed info for troubleshooting
docker pps -v problematic-container

# Check command, mounts, networks, labels

Verifying Traefik Labels

# See all Traefik routing labels
docker pps -v openwebui | grep traefik

# Check if container has correct labels
docker pps -v service-name

Checking Resource Usage

# See container sizes
docker pps -v | grep "Size:"

# Identify large containers

Network Inspection

# See which networks container is on
docker pps -v mongodb | grep -A10 "Networks:"

# Verify IP addresses

Comparison with docker ps

Standard docker ps

docker ps
# Output: Wide, hard to read, truncated columns

docker ps -a
# Shows all but still hard to parse

docker pps

docker pps
# Output: Clean table, readable

docker pps -v container-name
# Output: Detailed, formatted, complete information

Output Details

Brief Mode Fields

  • CONTAINER NAME: Container name
  • STATUS: Running status and uptime
  • PORTS: Port mappings (truncated if many)

Verbose Mode Sections

  1. Basic Info: ID, image, status, command
  2. Timing: Created time, uptime
  3. Ports: All port mappings
  4. Networks: Connected networks with IPs
  5. Size: Disk usage (writable layer + image)
  6. Mounts: Volumes and bind mounts
  7. Labels: All container labels (formatted)

Troubleshooting

Plugin Not Found

# Verify installation
ls -la ~/.docker/cli-plugins/docker-pps

# Make executable
chmod +x ~/.docker/cli-plugins/docker-pps

# Check Docker recognizes it
docker --help | grep pps

No Output

# Check if Docker daemon is running
docker info

# Check if any containers exist
docker ps -a

# Try verbose mode
docker pps -v

Permission Errors

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

# Log out and back in
# Test again
docker pps

Best Practices

  1. Use pps for daily checks - Cleaner than docker ps
  2. Use -v for debugging - Get all details at once
  3. Filter with grep - Combine with grep for specific info
  4. Check labels - Verify Traefik and compose labels
  5. Monitor running only - Use --running for active containers

Integration with Other Tools

With grep

# Find containers on specific network
docker pps -v | grep -A2 "Networks:" | grep proxy

# Check specific label
docker pps -v | grep "traefik.enable"

# Find large containers
docker pps -v | grep "Size:" | sort -h

With watch

# Monitor container status
watch -n 2 docker pps --running

# Watch specific container
watch -n 1 "docker pps -v ollama | grep Status"

In Scripts

#!/bin/bash
# Check if critical services are running
services="traefik mongodb pgvector ollama"

for service in $services; do
    if docker pps --running | grep -q "$service"; then
        echo "$service is running"
    else
        echo "$service is not running"
    fi
done

Related Documentation

Quick Reference

# Brief mode (default)
docker pps                    # All containers
docker pps --running          # Running only
docker pps --brief            # Explicit brief mode

# Verbose mode
docker pps -v                 # All containers, detailed
docker pps -v container-name  # Specific container
docker pps --verbose          # Alternative syntax

# Combined
docker pps --running --verbose  # Running containers, detailed

Next: Plugin: GPU Checker - docker smi →

Clone this wiki locally