How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide

Docker is a powerful tool for creating, deploying, and managing containers, making running applications in a consistent environment easier and time-saving. At the same time, Ubuntu is a great and reliable platform, suitable both for development and as a server you can trust for your Docker needs.

Installing Docker on Ubuntu 24.04 LTS (Noble Numbat):

Follow the steps outlined below. We’ve thoroughly tested and proven each one to ensure they provide you with the best and most effective solution.

First, run the two commands below to update the package index and install the prerequisite necessary for adding the new Docker repository, which we will do in a moment.

sudo apt update
sudo apt install apt-transport-https curl

Step 2: Add Docker’s Official GPG Key:

Next, import the Docker GPG repository key to your Ubuntu system. This security feature ensures that the software you’re installing is authentic.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

After importing the GPG keys, we’ll add the official Docker repository to our Ubuntu 24.04 LTS system. This implies that the update package will be made available with the rest of your system’s regular updates if a new version is released.

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

Next, refresh the package list.

sudo apt update

Run the below command to install the latest up-to-date Docker release on Ubuntu.

sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

That’s all! Docker should now be installed, service enabled, and set to start automatically on boot. In addition, check its status using the command below to confirm that everything is as expected: