No description
- Shell 78.6%
- Roff 21.4%
| doccheck.1 | ||
| doccheck.sh | ||
| install_manpage.sh | ||
| LICENSE | ||
| README.md | ||
doccheck - Docker Compose Stack Viewer
A powerful command-line tool for inspecting Docker Compose stacks with detailed container information, uptime tracking, and port mappings.
Features
- Comprehensive Stack Overview: View all Docker Compose stacks and their services
- Detailed Container Information: Shows uptime, creation date, and port mappings
- Smart Filtering:
- Filter stacks by name pattern
- Search for containers by name pattern and show their parent stack
- Customizable Output:
- Color-coded display with configurable highlighting
- Compact format showing only relevant differences
- Installation Options: Easy installation to
~/binwith symlink creation
Installation
Prerequisites
- Docker Engine (v20.10+ recommended)
- Docker Compose (v2+)
- Bash (v4.0+)
Quick Install
# Download the script
wget https://forgejo.mueller.network/Zentonic/doccheck.sh/raw/branch/main/doccheck.sh
# Make it executable
chmod +x doccheck.sh
# Install to ~/bin (optional)
./doccheck.sh --install
Manual Installation
-
Clone the repository:
git clone https://forgejo.mueller.network/Zentonic/doccheck.sh.git cd doccheck.sh -
Make the script executable:
chmod +x doccheck.sh -
Install the Script to ~/bin:
./doccheck.sh --install -
(Optional) Install the manpage:
sudo bash ./install_manpage.sh
Usage
Basic Commands
# Show help
doccheck -h
# List all running stacks
doccheck
# List all stacks (including stopped)
doccheck -a
# Filter stacks by name pattern
doccheck mypattern
# Search for containers by name pattern
doccheck -c containerpattern
Options
| Option | Description |
|---|---|
-a, --all |
Show all stacks (including stopped) |
-c, --container PATTERN |
Search for containers matching pattern |
-h, --help |
Show help message |
-n, --no-color |
Disable colored output |
--no-highlight |
Disable pattern highlighting |
--install |
Install script to ~/bin/doccheck |
Output Format
The tool displays information in a compact, color-coded format:
Host: your.hostname.com
Stack: mystack 2d05h30m (2026-02-15)
2026-02-16 service1 full-container-name 1d03h15m
0.0.0.0:8080->80/tcp
service2
0.0.0.0:3306->3306/tcp
Key features of the output:
- Stack name in cyan (bold)
- Uptime in blue (stack) or red (container if different)
- Creation dates in gray (only shown if different from stack)
- Port mappings in magenta
- Pattern matches highlighted in yellow (when enabled)
Examples
-
Show all stacks with "web" in their name:
doccheck web -
Find which stack contains a container named "db-prod":
doccheck -c db-prod -
Show all stacks without colors:
doccheck -n -a -
Show stacks with "api" in name without highlighting:
doccheck --no-highlight api
Technical Details
- Uses Docker's official
com.docker.compose.projectlabel to identify stack membership (Docker compose from different directories, Add new label com.docker.compose.projectfolder #6757 - Uptime comparisons are made with minute precision to avoid redundant output
- Full container names are only shown when they differ from service names
- Hostname is only displayed when stacks are found
- Container filtering uses Docker's native name filter capabilities(Docker Container filtern: So geht's – Anleitung & Best Practices | LabEx, Filter docker containers by name and stop them - Stack Overflow)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Holm / Christian Müller (https://mueller.network) with assistance from Mistral AI
Contributing
Contributions are welcome! Please open an issue or submit a pull request.