Portainer is a popular Docker UI that helps you visualize your containers, images, volumes and networks. Portainer helps you take control of the Docker resources on your machine, avoiding lengthy terminal commands.
Note that Docker has to be installed before you can follow these steps!
Run all of these commands in sequence:
docker volume create portainer_data
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
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
ports:
- 8000:8000
- 9443:9443
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/data
Portainer is now running on port 9443, behind https. To login, enter https://{serverIP}:9443 in the address bar, then create your user and password.
After logging in, click the box for Get Started.
To deploy Docker Compose files, go to Stacks > + Add Stack and copy & paste the compose.yaml there.