In this tutorial, I will explain how to install Docker and Docker Compose from the official Docker sources.
Au moment de la rédaction de ce tutoriel, Ubuntu 24.04 vient tout juste de sortir et Docker est déjà disponible sur les dépôt
On the Docker documentation, you have to pass several command lines to first install the repository then install Docker and Docker compose.
To save time, I compiled the different commands into a script:
As you can see in the screenshot below, I am connected via SSH to a computer with Ubuntu 24.04 LTS.
Start by creating a file with nano in which we will copy the script:
nano docker-install.sh
Paste the contents of the script that is at the beginning of the tutorial:
Run the script to start the installation of Docker and Docker compose:
sudo sh docker-install.sh
Please wait while installing…
Once the installation is complete, check the version of Docker and Docker compose.
sudo docker version
sudo docker compose version
To test how Docker works on your Ubuntu 24.04 server, it is possible to test with the hello-world container.
sudo docker run hello-world
You can now deploy your containers on Ubuntu 24.04.