Portainer is a powerful, open-source management tool for Docker environments, providing a user-friendly interface to simplify container management. Installing Portainer on Ubuntu 22.04 involves several steps, including setting up Docker, downloading the Portainer image, and running the Portainer container. This guide will walk you through the process step-by-step.
Prerequisites
Before starting, ensure that your system meets the following prerequisites:
- An Ubuntu 22.04 server.
- A user with sudo privileges.
- Basic knowledge of Docker commands.
Commands
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg –dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo “deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable” | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt install -y docker-ce docker-ce-cli containerd.io
sudo docker volume create portainer_data
sudo docker run -d -p 8000:8000 -p 9000:9000 –name=portainer –restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
sudo usermod -aG docker $USER
Video