Skip to main content

Overview

psys automatically detects Docker containers and their published ports, providing visual indicators and container name labels in the network visualization.

Container Detection

psys uses the docker ps command to discover running containers:
If Docker is not installed or not running, psys gracefully continues without Docker integration.

Port Mapping Parsing

The function parses Docker’s port mapping format:
Extracts:
  • Host port: 6379 (the port exposed on the host machine)
  • Container port: 6379 (the internal container port)
  • Protocol: tcp

Regex Pattern

This pattern matches:
  • Optional IP address (e.g., 0.0.0.0: or 127.0.0.1:)
  • Required host port number
  • Arrow ->
  • Container port number

Container Name Labeling

Once a port is identified as Docker-published, psys uses the container name as the service label:

Docker Icon Indicators

When a listener is associated with a Docker container, a Docker icon is displayed:

In Listener Nodes

In Table View

The Docker icon uses the official Docker blue color #2496ed for brand consistency.

Enhanced Icon Detection

Docker container names are used to improve icon detection:
Name your Docker containers descriptively (e.g., my-redis, api-postgres) to enable automatic icon detection.

Connection Labeling

Docker container names are also used to label connection targets:
This creates a mapping from address:port to container name, which is used when building connection labels:

Example Docker Scenarios

Redis Container

psys will display:
  • Service label: my-redis
  • Docker icon indicator
  • Redis process icon
  • Port: 6379

PostgreSQL Container

psys will display:
  • Service label: postgres-db
  • Docker icon indicator
  • PostgreSQL process icon
  • Port: 5432

Custom Port Mapping

psys will display:
  • Service label: api-server
  • Docker icon indicator
  • Node.js process icon
  • Port: 8080 (host port)
psys detects the host port (8080), not the container’s internal port (3000).

Requirements

Docker Engine

Docker must be installed and running on the system

Docker Permissions

User must have permissions to run docker ps (typically requires docker group membership)

Graceful Degradation

If Docker is not available:
  • No errors are thrown
  • Docker integration is silently disabled
  • All other psys features continue to work normally
  • Non-Docker processes are still monitored and displayed