How to install docker and docker-compose in Ubuntu 22.04

Docker is an open-source platform that makes easy the process of building, deploying, running, and updating containers. In this tutorial, we’ll explain how to install docker and docker-compose in a fresh Ubuntu 22.04 LTS installation.


To follow this tutorial, you need to have an Ubuntu 22.04 LTS server with root access.

Installation of Docker

The first step is to update our existing packages list.

sudo apt update

Installation of the prerequisite packages for the installation of Docker

sudo apt install apt-transport-https ca-certificates curl software-properties-common

After installing the prerequisites packages, we need to add the official docker repository GPG key to our system for the safe downloading of Docker.

curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Let’s add APT sources for the Docker repository

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Let’s make another update

sudo apt update

Now, check if we have added good sources for the docker community edition.

sudo apt-cache policy docker-ce
docker-ce source list

Voila. We have added the good source list. Let’s install docker in our system.

sudo apt install docker-ce
docker-ce installation page

When the installation finishes, type the following command to view the status of the docker daemon.

Docker-ce status.

Now, Docker is installed and open running in our system.

Installation of docker-compose

Use the following step to install docker-compose. The command we’ll show here will install the last version of docker-compose at the time you are reading this article.

The first step is to retrieve the last release version of docker-compose from his GitHub repository. To do that, use the following command:

VERSION=$(curl --silent | grep -Po '"tag_name": "\K.*\d')

The version of docker-compose at the time we are writing this article is 2.7.0.

The version of docker-compose at the time of this blog post

After that, finish the installation by executing the following command:

sudo curl -L${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
sudo chmod 755 $DESTINATION

Check the version of your docker-compose:

docker-compose –version


This article was a quick one with the only purpose to show you how to install Docker and docker-compose on your Ubuntu system. We’ll write a dedicated tutorial to explain Docker and docker-compose themselves. See us in the next tutorial.

2 thoughts on “How to install docker and docker-compose in Ubuntu 22.04

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top
porn by force indian girls fuck photos
kannada auntys sex videos indian local sex videos com
kolkata teen sex telugu xxx .com
gotporn indian men naked
m taxi 69 incent porn
indian awesome sex xnll
gand porn xnxx jabardasti mp3 hindi mp3
home sex malayalam indian sex vid
download indian girl sex video desi xvedios
ndiansex unexpected sex
xvideo plumber kannada real sex
sexy video rap poonam pandey xvideo
softcore 69
shemalexnxx desi choda video