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 thedocker 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:- Host port: 6379 (the port exposed on the host machine)
- Container port: 6379 (the internal container port)
- Protocol: tcp
Regex Pattern
- Optional IP address (e.g.,
0.0.0.0:or127.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:Connection Labeling
Docker container names are also used to label connection targets:address:port to container name, which is used when building connection labels:
Example Docker Scenarios
Redis Container
- Service label:
my-redis - Docker icon indicator
- Redis process icon
- Port: 6379
PostgreSQL Container
- Service label:
postgres-db - Docker icon indicator
- PostgreSQL process icon
- Port: 5432
Custom Port Mapping
- Service label:
api-server - Docker icon indicator
- Node.js process icon
- Port: 8080 (host port)
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