Contents

Portainer Install Docker

Contents

What is Portainer?

Portainer Community Edition is a lightweight service delivery platform for containerized applications that can be used to manage Docker, Swarm, Kubernetes and ACI environments.

How to install?

Assuming you already have docker installed. If not follow this tutorial according to Os to install docker and than run the below command on the terminal.

1
sudo docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

For Docker compose:

Create docker-compose.yaml with below code assuming you have already installed docker and docker-compose.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
version: '3'
services:
  prometheus:
    image: portainer/portainer-ce:latest
    container_name: portainer
    ports:
      - "9000:9000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - portainer_data:/data
    restart: unless-stopped

Loging to Webui:

http://localhost:9000

Create a new user and password.

Congratulation!

You have successfully installed portainer. Now you can manager all your containers from the GUI easily.