In this section, we'll set up Portainer using Docker Compose. Portainer is a web-based interface for creating, managing, and monitoring containers, making it accessible to users without extensive command-line experience.
mkdir portainer
cd portainer
nano docker-compose.yaml
version: "2.2"
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
volumes:
- /portainer:/data
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
ports:
- 8000:8000
- 9000:9000
restart: unless-stopped
Press `Ctrl` + `X`, then `Y`, and `Enter`
sudo apt install docker-compose
docker-compose up -d