9.2 KiB
Executable File
title, description, navigation
| title | description | navigation | ||
|---|---|---|---|---|
| Dock - Docker Compose Command Center | Making Docker Compose actually fun since 2023 |
|
"Making Docker Compose actually fun since 2023" - Dockge
What's This All About?
Dockge (pronounced "dog-ee" 🐕) is a fancy, self-hosted web UI for managing Docker Compose stacks. Think of it as Portainer's cooler younger sibling who actually understands what a compose file is! It's perfect for when you want to deploy, update, or manage containers without touching the command line (but let's be honest, you'll still use CLI because you're cool like that).
The Stack Captain
:icon{name="lucide:ethernet-port"} Dockge
Container: dock_app
Image: louislam/dockge:1
Port: 5001
Home: http://localhost:5001
Dockge makes Docker Compose management feel like playing with LEGO:
- :icon{name="lucide:clipboard"} Visual Stack Management: See all your compose stacks at a glance
- :icon{name="lucide:pen"} Built-in Editor: Edit compose files right in the browser
- :icon{name="lucide:rocket"} One-Click Deploy: Start, stop, restart with a button
- :icon{name="lucide:bar-chart"} Real-time Logs: Watch your containers do their thing
- :icon{name="lucide:file-text"} Compose File Preview: See what you're deploying before you deploy it
- :icon{name="lucide:palette"} Clean Interface: No cluttered UI, just what you need
- :icon{name="lucide:refresh-cw"} Update Tracking: Know when your stacks have changes
How It Works
You (Browser)
↓
Dockge UI (localhost:5001)
↓
Docker Socket
↓
Your Compose Stacks
Dockge talks directly to Docker via the socket - it's like having a conversation with Docker in its native language!
Configuration Breakdown
Docker Socket Access
volumes:
- /var/run/docker.sock:/var/run/docker.sock
This gives Dockge the power to manage Docker. With great power comes great responsibility!
Stacks Directory
volumes:
- /root/repos/compose:/root/repos/compose
This is where Dockge looks for your compose files. All the kompose stacks should be here!
Important: Make sure this path exists on your host:
mkdir -p /root/repos/compose
First Time Setup :icon
-
Ensure stacks directory exists:
mkdir -p /root/repos/compose -
Start Dockge:
docker compose up -d -
Access the UI:
URL: http://localhost:5001 -
Create your first user:
- First visitor gets to create the admin account
- Choose a strong password
- You're in! :icon{name="lucide:party-popper"}
Using Dockge Like a Pro
Deploying a New Stack
- Click "+ Compose"
- Give it a name (e.g., "my-cool-app")
- Write your compose file (or paste it):
name: my-cool-app services: web: image: nginx:latest ports: - 8080:80 - Click "Deploy"
- Watch it go! :icon{name="lucide:rocket"}
Managing Existing Stacks
From the dashboard, you can:
- :icon{name="lucide:play"} Start: Fire up all containers
- :icon{name="lucide:pause"} Stop: Gracefully stop everything
- :icon{name="lucide:refresh-cw"} Restart: Quick bounce
- :icon{name="lucide:file-text"} Edit: Change the compose file
- :icon{name="lucide:wrench"} Update: Pull new images and redeploy
- :icon{name="lucide:trash"} Delete: Remove stack completely
Viewing Logs
- Click on a stack
- Navigate to "Logs" tab
- Watch logs in real-time
- Filter by service if you have multiple containers
Editing Compose Files
- Click on a stack
- Click "Edit"
- Modify the YAML
- Click "Save"
- Click "Update" to apply changes
Environment Variables
Dockge reads .env files from the stack directory. Structure your stacks like:
/root/repos/compose/
├── my-app/
│ ├── compose.yaml
│ └── .env
├── another-app/
│ ├── compose.yaml
│ └── .env
Integration with Kompose Stacks
If your kompose stacks are at /home/valknar/Projects/kompose, either:
Option A: Symlink
ln -s /home/valknar/Projects/kompose /root/repos/compose/kompose
Option B: Update the env variable
# In .env file
DOCKGE_STACKS_DIR=/home/valknar/Projects/kompose
Then restart Dockge:
docker compose down && docker compose up -d
Features You'll Love :icon
Terminal Access
Click "Terminal" to get a shell in any container - no docker exec needed!
Network Visualization
See which containers are talking to each other (visual network graph coming soon™).
Resource Monitoring
Check CPU, memory, and network usage at a glance.
Compose File Validation
Dockge tells you if your YAML is broken before you try to deploy.
Multi-Stack Actions
Select multiple stacks and start/stop them all at once.
Ports & Networking
- Web UI: 5001 (exposed directly, Traefik labels commented out)
- Network:
kompose(sees all your other containers) - Docker Socket: Full access (read + write)
Security Considerations :icon
:icon{name="lucide:alert-triangle"} Important Security Notes
- No Built-in Auth Beyond First User: After creating admin, there's basic auth
- Docker Socket Access: Dockge can do ANYTHING Docker can
- Exposed Port: Currently accessible to anyone who can reach port 5001
- Network Access: Can see and manage all Docker resources
Securing Dockge
Option 1: Enable Traefik (Recommended)
Uncomment the Traefik labels in compose.yaml and access via HTTPS with Let's Encrypt.
Option 2: Firewall Rules
# Only allow from specific IP
ufw allow from 192.168.1.100 to any port 5001
Option 3: VPN Only Only access Dockge when connected to your VPN.
Common Tasks
Import Existing Stacks
If you already have compose files:
- Copy them to your stacks directory
- Refresh Dockge
- They appear automatically!
Update All Stacks
- Select all stacks (checkbox)
- Click "Pull"
- Wait for images to download
- Click "Update" on each stack
Backup Configurations
# Backup entire stacks directory
tar -czf dockge-backup-$(date +%Y%m%d).tar.gz /root/repos/compose/
View Container Stats
Each stack shows:
- Memory usage
- CPU percentage
- Network I/O
- Container status
Troubleshooting
Q: Dockge can't see my stacks?
A: Check the DOCKGE_STACKS_DIR path is correct and Docker socket is mounted
Q: Can't start a container?
A: Check the logs tab for error messages - usually port conflicts or missing images
Q: Changes not applying?
A: Click "Update" after editing - "Save" only saves the file
Q: UI is slow?
A: Check Docker socket performance, might have many containers
Q: Lost admin password?
A: Delete the Dockge volume and start fresh (you'll lose user accounts)
Advanced Tips :icon
Custom Network Configuration
Dockge respects network definitions in your compose files:
networks:
my_network:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/16
Health Checks
Add health checks to your services:
services:
web:
image: nginx
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 30s
timeout: 3s
retries: 3
Dockge will show health status in the UI!
Depends On
Use service dependencies:
services:
web:
depends_on:
db:
condition: service_healthy
db:
image: postgres
healthcheck:
test: ["CMD", "pg_isready"]
Dockge vs. Alternatives
| Feature | Dockge | Portainer | Docker CLI |
|---|---|---|---|
| Compose-First | ✅ | ❌ | ✅ |
| Lightweight | ✅ | ❌ | ✅ |
| Built-in Editor | ✅ | Limited | ❌ |
| Learning Curve | Easy | Medium | Hard |
| Visual Appeal | ✅ | ✅ | 😢 |
Why Choose Dockge?
- :icon{name="lucide:target"} Compose-Native: Built specifically for docker-compose
- :icon{name="lucide:feather"} Lightweight: Tiny footprint, fast UI
- :icon{name="lucide:palette"} Beautiful: Clean, modern interface
- :icon{name="lucide:wrench"} Simple: Does one thing really well
- :icon{name="lucide:smile"} Free: Open source, no enterprise upsells
- :icon{name="lucide:laptop"} Dev-Friendly: Doesn't hide the compose file from you
Integration Ideas
With CI/CD
Deploy from GitLab/GitHub → Dockge picks up changes:
# .gitlab-ci.yml
deploy:
script:
- scp compose.yaml server:/root/repos/compose/my-app/
- curl -X POST http://localhost:5001/api/stack/my-app/update
With Monitoring
Dockge + Grafana + Prometheus = :icon{name="lucide:bar-chart"} Beautiful dashboards
With Backup Tools
Automated backups of your compose files:
# Cron job
0 2 * * * tar -czf /backups/dockge-$(date +\%Y\%m\%d).tar.gz /root/repos/compose/
Resources
"The best UI is the one that gets out of your way and lets you work." - Dockge Philosophy :icon{name="lucide:sparkles"}