docker installation

This documentation shows how to install docker from the docker ppa 
 Create users and groups 
 First create a user and group cloud 
 useradd -u 1002 -m cloud
 
 Add the user cloud to the sudo group 
 usermod -a -G sudo cloud
 
 Add a docker group 
 groupadd docker
 
 Add the user cloud to the docker group 
 usermod -aG docker cloud
 
 Gibe the user the bash shell 
 usermod --shell /bin/bash cloud
 
 basic dependencies 
 Ubuntu 22.04 LTS 
 # Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
 "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
 $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
 sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
 
 Ubuntu 24.04 LTS 
 apt install apt-transport-https curl
 
 Install some basic dependencies 
 apt update && apt upgrade -y && apt install vim screen lsof apt-transport-https ca-certificates curl software-properties-common -y 
 
 Ubuntu 20.04 
 sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
 
 docker repository configuration 
 Ubuntu 24.04 LTS 
 https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /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
 
 apt update
 
 Add the repository key of the docker repository 
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
 
 Now add the apt configuration for the repository 
 add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
 
 You could also alternatively add the testing repository instead of the stable repository 
 add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) test"
 
 install docker 
 apt update && apt install docker-ce docker-ce-cli containerd.io -y
 
 install docker-compose 
 Get the latest docker-compose 
 curl -L https://github.com/docker/compose/releases/download/v2.27.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
 
 Set the proper rights 
 chmod +x /usr/local/bin/docker-compose
 
 And check if docker-compose works 
 docker-compose --version
 
 This should give a response like this 
 docker-compose version 1.25.0-rc2, build 661ac20e