Sign inSign up

djlactose/harbormaster

By djlactose

โ€ขUpdated 6 months ago

HarborMaster is a lightweight web dashboard that provides a clean, responsive homepage

Image
Monitoring & observability
0

10K+

djlactose/harbormaster repository overview

โ HarborMaster

HarborMaster is a lightweight web dashboard for your Docker ecosystem. It displays running containers and Swarm services with clickable web links, auto-refresh, thumbnail previews, and intuitive sorting/filtering โ€” all without any database.


โ โš“ Features

  • โœ… Unified view of:
    • Docker containers
    • Docker Swarm services
  • ๐Ÿ” Container and service discovery via Docker socket
  • ๐ŸŒ Clickable web links for HTTP/HTTPS ports
  • ๐Ÿงญ Supports TCP and UDP port visibility
  • ๐Ÿ–ผ๏ธ Live thumbnail previews of web UIs
  • โœ๏ธ Per-container IP overrides (for reverse proxies or remote hosts)
  • ๐ŸŒ“ Light & dark mode with theme toggle
  • ๐Ÿ”„ Auto-refresh with configurable intervals
  • ๐Ÿงฐ Sort by name, image, port count, or status
  • ๐Ÿงช All settings saved locally as JSON โ€” no database needed

โ ๐Ÿณ Docker Image

You can pull and run the official image from Docker Hub:

docker pull djlactose/harbormaster

๐Ÿ”— Docker Hub Repositoryโ 


โ ๐Ÿš€ Getting Started

โ 1. Clone and Build
git clone https://github.com/djlactose/harbormaster.git
cd harbormaster
docker build -t harbormaster .
โ 2. Run It (Bind Docker Socket)
docker run -d -p 8080:8080 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v $(pwd)/data:/data \
  --name harbormaster \
  harbormaster

Mounting /data allows settings to persist across restarts.


โ โš™๏ธ Configuration

All settings are stored in a JSON file:

/data/settings.json

Example contents:

{
  "base_ip": "192.168.1.10",
  "overrides": {
    "nginx": "192.168.1.12"
  },
  "show_stopped": true,
  "show_unmapped": false,
  "auto_refresh_seconds": 10,
  "sort_by": "name"
}

These can also be changed from the dashboard UI.


โ ๐Ÿ Swarm Support

  • Swarm services are shown with a Swarm icon.
  • Published ports (TCP/UDP) are detected and displayed.
  • Underlying task containers are excluded to avoid duplication.
  • Clickable links are generated if a service responds to HTTP or HTTPS.

To deploy HarborMaster to all nodes in a Swarm:

docker service create --mode global \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -p 8080:8080 \
  --name harbormaster \
  djlactose/harbormaster

โ ๐Ÿ“ธ Screenshot Thumbnails

HarborMaster attempts to take live screenshots of container web UIs.

  • Saved in /static/thumbnails/
  • Uses pyppeteer under the hood
  • Only attempts capture if HTTP/HTTPS is detected

You can trigger a screenshot manually:

python screenshot.py <name_port> <url>

โ ๐ŸŽจ Customization

  • static/icons/ contains:
    • generic.png for unknown services
    • swarm.png for Docker Swarm services
    • logo_light.png / logo_dark.png for branding

You can add custom icons by service name or image match.


โ ๐Ÿงช Development

Dependencies:

pip install -r requirements.txt

Then run locally:

python app.py

Access at: http://localhost:8080


โ ๐Ÿ“œ License

MIT License
Copyright ยฉ djlactose


โ ๐Ÿ™Œ Credits

Built on the Docker SDK for Python.
Enhanced UI + Swarm support by community contributors.

Tag summary

Content type

Image

Digest

sha256:65bbc6926โ€ฆ

Size

491.4 MB

Last updated

6 months ago

docker pull djlactose/harbormaster