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.

Prerequisites

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 https://download.docker.com/linux/ubuntu/gpg | 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] https://download.docker.com/linux/ubuntu $(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 https://api.github.com/repos/docker/compose/releases/latest | 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:

DESTINATION=/usr/local/bin/docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
sudo chmod 755 $DESTINATION

Check the version of your docker-compose:

docker-compose –version

Conclusion

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 indianhub.me indian girls fuck photos
kannada auntys sex videos ounoun.com indian local sex videos com
kolkata teen sex indianporncave.mobi telugu xxx .com
gotporn redwap3.com indian men naked
m taxi 69 hotindiantube.net incent porn
indian awesome sex tryporn.net xnll
gand porn analpornstars.info xnxx jabardasti
dj-punjab.in xxxvideohd.info mp3 hindi mp3
home sex malayalam pornstarsporn.info indian sex vid
download indian girl sex video indiapornfilm.pro desi xvedios
ndiansex babezporn.com unexpected sex
xvideo plumber xxx-tube-list.net kannada real sex
sexy video rap arabpornsamples.com poonam pandey xvideo
softcore 69 tryporno.net fuck.sc
shemalexnxx screwmyindianwife.info desi choda video