Portainer installieren
# Portainer CE (Community Edition, kostenlos)
docker volume create portainer_data
docker run -d --name portainer --restart always -p 9443:9443 -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
# Web-UI: https://server:9443 (HTTPS)
# oder: http://server:9000 (HTTP - nur intern!)
# Admin-Account erstellen (erste Anmeldung)
Portainer Features
Container:
- Liste aller Container (running/stopped)
- Start/Stop/Restart/Remove per Klick
- Logs in Echtzeit (Tail)
- In Container Terminal (exec)
- Container-Statistiken (CPU/RAM/Net)
Images:
- Image-Liste, Pull neuer Images
- Build aus Dockerfile
- Image-Registry (eigene oder Docker Hub)
Volumes und Netzwerke:
- Volumes anlegen und verwalten
- Netzwerke konfigurieren
Stacks (docker-compose):
- Docker Compose via Web-UI deployen
- Stack aus Git-Repository
Stack deployen (Docker Compose)
Stacks → Add Stack → Web Editor
Compose-Datei einfügen (YAML):
services:
nextcloud:
image: nextcloud:latest
ports:
- "8080:80"
volumes:
- nextcloud-data:/var/www/html
volumes:
nextcloud-data:
→ "Deploy the Stack"
Portainer Agent (Remote-Server)
# Portainer kann mehrere Docker-Hosts verwalten
# Auf Remote-Server: Portainer Agent installieren
docker run -d --name portainer_agent --restart always -p 9001:9001 -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent:latest
# In Portainer: Environments → Add Environment
# Type: Agent
# Name: web-server-01
# Agent URL: https://192.168.1.10:9001
Watchtower – Auto-Updates
# Automatisch neue Docker-Images ziehen und Container neustarten
# docker-compose.yml
services:
watchtower:
image: containrrr/watchtower
container_name: watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
WATCHTOWER_CLEANUP: "true" # Alte Images löschen
WATCHTOWER_POLL_INTERVAL: 86400 # 24h Intervall
WATCHTOWER_NOTIFICATIONS: email
WATCHTOWER_NOTIFICATION_EMAIL_TO: [email protected]
WATCHTOWER_NOTIFICATION_EMAIL_FROM: [email protected]
WATCHTOWER_NOTIFICATION_EMAIL_SERVER: mail.firma.de
FAQ
Was ist der Unterschied zwischen Portainer CE und BE?
CE: kostenlos, Single-Environment kostenlos, bis zu 3 Nodes. BE (Business): Kostenpflichtig, mehr Environments, RBAC, AD-Integration.
Fazit
Portainer macht Docker-Management zugänglich für Teams ohne tiefer Docker-CLI-Kenntnisse – Logs, Neustarts und Stack-Deployments per Mausklick.
Docker-Verwaltung und Container-Infrastruktur für KMU in Heidelberg, Mannheim und der Rhein-Neckar-Region. Anfragen.