Home ยป Portainer Installation

Portainer Installation

0 comment 119 views

Follow below steps.

  1. Install Docker related component.
    • sudo apt-get update
    • sudo apt-get install ca-certificates curl gnupg
    • sudo install -m 0755 -d /etc/apt/keyrings
  2. Add repository
    • # For Ubuntu
    • curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg –dearmor -o /etc/apt/keyrings/docker.gpg
    • sudo chmod a+r /etc/apt/keyrings/docker.gpg
    • echo \
    • “deb [arch=”$(dpkg –print-architecture)” signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
    • $(. /etc/os-release && echo$VERSION_CODENAME)” stable” | \
    • sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    • # For Debian
    • curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg –dearmor -o /etc/apt/keyrings/docker.gpg
    • sudo chmod a+r /etc/apt/keyrings/docker.gpg
    • echo \
    • “deb [arch=”$(dpkg –print-architecture)” signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
    • $(. /etc/os-release && echo$VERSION_CODENAME)” stable” | \
    • sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  3. Install Docker
    • sudo apt-get update
    • sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  4. Post configuration
    • sudo groupadd docker
    • sudo usermod -aG docker $USER
    • sudo systemctl enable docker
    • sudo systemctl start docker
  5. Test with Hello Word
    • sudo docker run hello-world
  6. Create Docker Volume for Portainer
    • docker volume create portainer_data
  7. Install Portainer
    • docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 –name portainer –restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
  8. Access Portainer WebUI and complete the initial setup.
    • https://localhost:9443

Reference:
https://ivonblog.com/posts/install-docker-engine-on-linux/
https://ivonblog.com/posts/portainer-installation/
https://earthly.dev/blog/portainer-for-docker-container-management/

Leave a Comment