Portainer
Portainer is a web GUI to manage Docker hosts. There should be one docker container running Portaininer and an instance of portaininer-agent on each machine. (There is a limit on the max number of hosts that can be managed on the community edition of Portaininer.)
Current Setup
Main Instance running on a VM on Metal1 (ProxMox Server) at 192.168.182.5. There is an agent instance on Wise1 at 192.168.182.14. The portaininer container is present and configured, but not running. This does mean when metal1 is suspenended nothing is running portainer.
| Linux | IP | notes |
|---|---|---|
| Portainer on Metal1 | 192.168.182.5 | Running on a VM on metal1 |
| Portainer2 on Wise1 | 192.168.182.14 | Running on wise1 (Wyse Thin Client) |
Setup
Portainer
$ docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data \
portainer/portainer-ce:latestAgent
Configure in Portaininer:
- image: portainer/agent
- network 9001:9001
- volume - bind:
- /var/run/docker.sock : /var/run/docker.sock
- /var/lib/docker/volumes : /var/lib/docker/volumes
- restart policy : unless-stopped
Add Agent to another Portainer
- Environments -> Add environment
- Select Docker Standalone -> Start Wizard
- Select Agent
- Name : any appropriate name
- Environment address : <host name>:9001
Issues
Restarting
When I restarted the ProxMox server after an upgrade, the docker1 VM started, but Portainer did not start, so the stacks and containers configured in Portainer did not start.
TODO:
- Ensure Portainer docker containter is setup to restart-policy: always
- Test that all Stacks/ Containers start when portainer starts up.