How to install Docker on Debian

Post Reply
User avatar
isscbta
Team Member
Posts: 132
Joined: Mon Jul 19, 2021 1:41 am
Has thanked: 16 times
Been thanked: 3 times

Docker is a popular containerization technology that simplifies the process of packaging, distributing, and running software applications in a portable and efficient manner. Containerization is the practice of bundling an application and its dependencies into a single package, which can be easily moved between different computing environments.

At its core, Docker provides a way to isolate an application and its dependencies into a lightweight, standalone container that can run on any system with Docker installed, regardless of the underlying hardware or software. This means that developers can build applications in a consistent and predictable environment, and deploy them with confidence that they will work as expected.

Follow those steps in order to install Docker on myVesta Hosting Panel:

In your SSH, as root, run:

Code: Select all

apt update
apt-get install ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

curl -s https://api.github.com/repos/docker/compose/releases/latest   | grep browser_download_url   | grep docker-compose-linux-x86_64   | cut -d '"' -f 4   | wget -qi -
chmod +x docker-compose-linux-x86_64
mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose
docker-compose version

useradd dev            # if you need to run docker as 'dev' user
usermod -aG docker dev # or any other username you want to be able to run docker commands
newgrp docker
systemctl restart docker
After you finish the installation, you will likely need to open some ports that Docker expects to be open but are not opened by default on myVesta Hosting Panel. You can do this through the myVesta Hosting Panel or via SSH: viewtopic.php?f=26&t=653
User avatar
myVesta
Site Admin
Posts: 936
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

Tutorial for old Deban 10:

Code: Select all

sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt update
# apt-cache policy docker-ce
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

curl -s https://api.github.com/repos/docker/compose/releases/latest   | grep browser_download_url   | grep docker-compose-linux-x86_64   | cut -d '"' -f 4   | wget -qi -
chmod +x docker-compose-linux-x86_64
mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose
docker-compose version
Post Reply