Portainer is an open-source lightweight management UI which allows you to easily manage your Docker host or Swarm cluster. It provides a detailed overview of Docker and allows you to manage containers, images, networks, and volumes.
Here are the steps to install Portainer using Docker Compose: Create a Docker Compose file: Create a docker-compose.yml file in your project directory and add the following content:
-
Create a Docker Compose file: Create a docker-compose.yml file in your project directory and add the following content:
version: "3" services: portainer: image: portainer/portainer-ce:latest container_name: portainer ports: - "75:9000" volumes: - /etc/localtime:/etc/localtime:ro - ./portainer-data:/data - /var/run/docker.sock:/var/run/docker.sock restart: unless-stopped
-
Run Docker Compose: Run the following command to start Portainer using Docker Compose:
docker-compose up -d
-
This command will download the Portainer image from the Docker Hub and start a new container.
Access Portainer: Open a web browser and navigate to http:https://localhost:75. You should see the Portainer login screen. Please note that the portainer-data directory is used to store Portainer data and it's added to the .gitignore file to prevent it from being tracked by Git.