Introduction to Portainer
Chapter objectives
- Understand what Portainer is
- Discover the main features
- Compare the Community and Business editions
- Identify use cases
1 - What is Portainer?
Definition
Portainer is a lightweight web graphical interface for managing your container environments:
- Docker standalone
- Docker Swarm
- Kubernetes
- Azure ACI
- Nomad
┌─────────────────────────────────────────────────────────────┐
│ Portainer Server │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Interface Web │ │
│ │ (Dashboard, Gestion, Monitoring) │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ┌──────────────────┼──────────────────┐ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ Docker │ │ Swarm │ │Kubernetes │ │
│ │Standalone │ │ Cluster │ │ Cluster │ │
│ └───────────┘ └───────────┘ └───────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
Why Portainer?
| Without Portainer | With Portainer |
|---|---|
| Command line only | Intuitive graphical interface |
| Complex commands to memorize | Actions in a few clicks |
| No overview | Centralized dashboard |
| Complex multi-host management | Unified management |
| No native access control | Integrated RBAC |
2 - Main features
Container management
- Create, start, stop, restart
- View logs in real time
- Access the terminal (exec)
- Inspect the configuration
- Resource statistics
Image management
- List local images
- Pull from registries
- Build images (via Dockerfile)
- Remove unused images
Volume and network management
- Create and manage volumes
- Configure networks
- Visualize connections
Stacks and templates
- Deploy Docker Compose applications
- Use predefined templates
- Manage Swarm services
Administration
- User management
- Access control (RBAC)
- Multi-environment management
- Webhooks and API
3 - Portainer editions
Portainer CE (Community Edition)
Free and open-source
| Feature | Available |
|---|---|
| Docker management | ✅ |
| Swarm management | ✅ |
| Kubernetes management | ✅ (limited) |
| Multi-environments | ✅ (3 max) |
| Users | ✅ |
| Basic RBAC | ✅ |
| Templates | ✅ |
| Support | Community |
Portainer BE (Business Edition)
Paid with advanced features
| Feature | Available |
|---|---|
| Everything in CE + | ✅ |
| Unlimited environments | ✅ |
| Advanced RBAC | ✅ |
| Registry management | ✅ |
| OAuth/LDAP | ✅ |
| Audit logs | ✅ |
| Official support | ✅ |
Comparison
┌────────────────────────────────────────────────────────────┐
│ Portainer Editions │
├──────────────────────┬─────────────────────────────────────┤
│ Community (CE) │ Business (BE) │
├──────────────────────┼─────────────────────────────────────┤
│ Gratuit │ Payant (par nœud) │
│ Open Source │ Propriétaire │
│ 3 environnements │ Illimité │
│ RBAC basique │ RBAC avancé + OAuth │
│ Support communauté │ Support entreprise │
└──────────────────────┴─────────────────────────────────────┘
4 - Architecture
Components
┌─────────────────────────────────────────────────────────────┐
│ Navigateur │
│ (Chrome, Firefox...) │
└──────────────────────────┬──────────────────────────────────┘
│ HTTPS (9443)
▼
┌─────────────────────────────────────────────────────────────┐
│ Portainer Server │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Web UI │ │
│ │ (React Frontend) │ │
│ └─────────────────────────────────────────────────────┘ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ API Backend │ │
│ │ (Go Backend) │ │
│ └─────────────────────────────────────────────────────┘ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Database (BoltDB) │ │
│ │ /data/portainer.db │ │
│ └────────────────────────────── ───────────────────────┘ │
└──────────────────────────┬──────────────────────────────────┘
│
┌────────────────┼────────────────┐
│ │ │
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Docker │ │ Agent │ │ Agent │
│ Local │ │ (Remote)│ │ (Swarm) │
└─────────┘ └─────────┘ └─────────┘
Connection modes
| Mode | Description | Use |
|---|---|---|
| Local | Mounted Docker socket | Development, single-node |
| Agent | Portainer agent on each node | Multi-host, Swarm |
| Edge Agent | Outbound connection | Remote/NAT environments |
5 - Use cases
Development
- Local dev environment
- Quick container tests
- Easier debugging
Teams
- Interface accessible to non-CLI experts
- Access management per project
- Simplified onboarding
Production
- Centralized monitoring
- Multi-cluster management
- Audit and compliance
Training
- Learning Docker
- Visualizing concepts
- Safe experimentation
6 - Alternatives to Portainer
Comparison
| Tool | Docker | Swarm | K8s | GUI | Free |
|---|---|---|---|---|---|
| Portainer | ✅ | ✅ | ✅ | ✅ | CE free |
| Rancher | ❌ | ❌ | ✅ | ✅ | ✅ |
| Lens | ❌ | ❌ | ✅ | ✅ | ✅ |
| Docker Desktop | ✅ | ❌ | ✅ | ✅ | Limited |
| Cockpit | ✅ | ❌ | ❌ | ✅ | ✅ |
Why choose Portainer?
- Versatile: Docker, Swarm and Kubernetes
- Lightweight: ~100 MB, quick deployment
- Complete: Full management without plugins
- Accessible: Intuitive interface
7 - Getting started
Quick deployment
# Créer le volume de données
docker volume create portainer_data
# Lancer Portainer CE
docker run -d \
-p 8000:8000 \
-p 9443:9443 \
--name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest
# Accéder à l'interface
# https://localhost:9443
First access
- Open https://localhost:9443
- Create the administrator account
- Choose the environment (local)
- Explore the dashboard
Summary
| Aspect | Description |
|---|---|
| Type | Web management interface |
| Targets | Docker, Swarm, Kubernetes |
| Editions | CE (free), BE (paid) |
| Deployment | Docker container |
| Port | 9443 (HTTPS) |
Key points
- Portainer simplifies container management
- Graphical interface accessible to all skill levels
- Free Community edition for most needs
- Deployment in less than a minute
Practical exercises
- List 3 advantages of Portainer compared to the CLI
- Which edition to choose for a team of 5 people?
- What are the available connection modes?
- Deploy Portainer locally and explore the interface