Install Docker and Portainer

Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. Because all of the containers share the services of a single operating system kernel, they use fewer resources than virtual machines. The service has both free and premium tiers. The software that hosts the containers is called Docker Engine.

Portainer CE is a lightweight ‘universal’ management GUI that can be used to easily manage Docker, Swarm, Kubernetes and ACI environments. It is designed to be as simple to deploy as it is to use. Portainer consists of a single container that can run on any cluster. It can be deployed as a Linux container or a Windows native container. Portainer allows you to manage all your orchestrator resources (containers, images, volumes, networks and more) through a super-simple graphical interface. A fully supported version of Portainer is available for business use.

Install Docker and Portainer on Raspberry Pi, Ubuntu and Debian variants

Supported OS:

To upgrade and Install Docker and Portainer on Raspberry Pi, Ubuntu and Debian variants, you need the 64-bit version of one of these:

  • Ubuntu Hirsute 21.04
  • Ubuntu Focal 20.04 (LTS)
  • Ubuntu Bionic 18.04 (LTS)
  • Debian Bullseye 11 (stable)
  • Debian Buster 10 (oldstable)
  • Raspbian Bullseye 11 (stable)
  • Raspbian Buster 10 (oldstable)

Docker Engine is supported on x86_64 (or amd64), armhf, and arm64 architectures.

Uninstall old versions

It’s always a good idea to cleanup before you install Docker and  Portainer. You might want to do some research if it’s not a new host machine where you are installing Docker and  Portainer.

sudo apt-get remove docker docker-engine docker.io containerd runc

Install Docker

Install using the repository

Before you install Docker and Portainer for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository.

Script for Raspbian (click to show)

For Raspbian, installing using the repository is not yet supported. You must instead use the convenience script, commands below will install Docker stable:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) 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-get update
sudo apt upgrade
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world

Install Portainer:

To Install Portainer simply run the following commands:

sudo docker pull portainer/portainer-ce:latest
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

Upgrade Portainer:

To Upgrade Portainer simply run the following commands:

sudo docker stop portainer
sudo docker rm portainer
sudo docker pull portainer/portainer-ce:latest
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

Check Also

Please use the command line updater because updating via browser is disabled in your config.php error on NextCloud

Received error upon launching Docker NextCloud on my Unraid server. Update needed Please use the …

Whispers: A Powerful Static Code Analysis Tool for Credential Detection

“My little birds are everywhere, even in the North, they whisper to me the strangest …

Leave your solution or comment to help others.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from blackMORE Ops

Subscribe now to keep reading and get access to the full archive.

Continue reading

Privacy Policy on Cookies Usage

Some services used in this site uses cookies to tailor user experience or to show ads.