6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.
04 LTS: A Step-by-Step Guide
How to Install Docker on
Ubuntu 24.04 LTS: A Step-by-
Step Guide
Install Docker effortlessly on Ubuntu 24.04 LTS (Noble
Numbat) with our expert, easy-to-follow guide. Perfect for
beginners and pros alike.
By Bobby Borisov - On May 3, 2024
Docker is a powerful tool for creating, deploying, and managing
containers, making it easier and time-saving to run applications in
a consistent environment. At the same time, Ubuntu is a great and
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 1/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
reliable platform, suitable both for development and as a server
you can trust for your Docker needs.
Whether you’re a developer eager to containerize your
applications or just curious about Docker and its capabilities,
you’ve come to the right place. We crafted this guide to help you
smoothly install Docker on your Ubuntu 24.04 LTS system,
ensuring you can start containerizing your applications quickly.
Just 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.
Installing Docker on Ubuntu 24.04 LTS
(Noble Numbat)
We’ll start with a clarification—there are several ways to install
Docker on Ubuntu 24.04. The most straightforward one is to install
it from the Ubuntu repos with a single APT command. However,
the main drawback to this approach is that the version available is
not always the most recent.
For this reason, this guide will show you how to install Docker on
Ubuntu 24.04 from its official repository, where you will always get
the latest version.
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 2/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
The best part? It will automatically receive all future software
updates as they become available, thus ensuring you always have
the latest and greatest. So, let’s get started!
Step 1: Install Required Packages
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.
oad.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/
Add Docker’s official GPG key.
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 3/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
Step 3: Set Up Docker’s Stable Repository
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.
ERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list >
Add the official Docker repository to Ubuntu 24.04 LTS.
As with the previous command, its execution produces no output.
Next, refresh the package list.
sudo apt update
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 4/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
Update the package base.
As you can see, our new Docker repository is now available and
ready to be used.
Step 4: Install Docker Engine on Ubuntu 24.04 LTS
Run the below command to install the latest up-to-date Docker
release on Ubuntu.
all docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-comp
Install Docker on Ubuntu 24.04 LTS (Noble Numbat).
This installs the following Docker components:
docker-ce: The Docker engine itself.
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 5/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
docker-ce-cli: A command line tool that lets you talk to the
Docker daemon.
containerd.io: A container runtime that manages the
container’s lifecycle.
docker-buildx-plugin: This extension for Docker enhances
the capabilities of building images, mainly focusing on multi-
platform builds.
docker-compose-plugin: A configuration management
plugin that helps manage multi-container Docker
applications using a single YAML file.
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:
sudo systemctl is-active docker
Check the status of the Docker service.
Step 5: Verify Installation
The moment of truth. Let’s check if our new Docker installation
works correctly by running a simple containerized application
called “hello-world.”
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 6/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
sudo docker run hello-world
Docker successfully installed, up & running on Ubuntu 24.04 LTS.
Congratulations! As we can see, everything works properly.
Enabling Non-root Users to Run Docker
Commands
So far, you have successfully installed Docker on your Ubuntu
22.04 LTS system. However, only root and users with sudo
privileges can execute Docker commands by default.
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 7/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
That means if you attempt to run the docker command without
prefixing it with sudo , you’ll get an error message like this:
Docker permission denied.
But there is no room for worry. To run Docker commands as a
non-root user, add your user to the “docker” group. To do that,
type in the following:
sudo usermod -aG docker ${USER}
In the above command, “${USER}” is an environment variable that
contains your username. To apply for the new group membership,
reboot your Ubuntu system. You can then
execute docker commands without prefixing them with sudo .
Run the docker command as a regular user.
Uninstall Docker Engine
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 8/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
If, for some reason, you decide to remove Docker from your
Ubuntu 24.04 system, run the following command first:
sudo apt purge docker-ce docker-ce-cli containerd.io docker-buildx-plugi
Then, manually remove the following two directories:
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
Conclusion
Following our guide’s steps, you now have Docker successfully
installed on your Ubuntu 24.04 LTS system. You’re all set and well-
equipped to get on with your Docker projects.
To learn more about Docker, I highly recommend checking out its
official documentation.
As always, if you encounter any issues or have questions, let me
know in the comments section below. Thank you for following this
tutorial, and happy Dockerizing!
Tell others:
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 9/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
Bobby Borisov
Bobby, an editor-in-chief at Linuxiac, is a Linux professional
with over 20 years of experience. With a strong focus on
Linux and open-source software, he has worked as a Senior
Linux System Administrator, Software Developer, and
DevOps Engineer for small and large multinational
companies.
What's your reaction?
5 Comments LOGIN
Share your thoughts...
Top
W Walter 18 days ago
Awesome write up!! One question on installation options - Do you have any
suggestions on how to use a separate hard disk to store containers and
docker images. I have as SSD that is mounted as /u. Is there a way to do this
when you install docker vs later?
0 0 Reply
Bobby Borisov 17 days ago
Great question, Walter, and thanks for asking! Absolutely, it's
possible. In fact, you gave me an idea for writing a guide on the subject.
🙂 It's now available: "How to Change Docker's Default Data Directory."
Enjoy!
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 10/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
1 0 Reply
M MC 29 days ago
greate. work perfectly
0 0 Reply
W Walter 1 month ago
Just awesome
0 0 Reply
a alexei 1 month ago
thanks
0 0 Reply
by Hyvor Talk
THINK YOU'RE AN
UBUNTU EXPERT? LET'S
FIND OUT!
Put your knowledge to the test in our lightning-fast
Ubuntu quiz!
Ten questions to challenge yourself to see if you're
a Linux legend or just a penguin in the making.
Start Quiz!
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 11/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
TRENDING
OpenSSH Enhances Security with New Feature
CentOS 7’s Final Countdown: 30 Days Left Until Support Ends
Exciting New Features Are Coming to Thunderbird Mail Client
openSUSE Aeon Is Close to Final Stable Release
How to Change Shell in Linux: A Practical Approach
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 12/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
SUPPORT US
Enjoy the article?
A $2 donation keeps my Linux writing round the clock. Made my
day; contribute a cup!
NEWSLETTER
Subscribe to our weekly newsletter and get all the latest updates
from the world of Linux and Open Source straight to your inbox.
Subscribe
Related Posts
How to Install DEB File in Ubuntu 24.04 LTS TrueNAS SCALE Introducing Game-Changer Features
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 13/14
6/12/24, 5:18 PM How to Install Docker on Ubuntu 24.04 LTS: A Step-by-Step Guide
June 9, 2024 June 5, 2024
Ubuntu Core 24 Launches with Enhanced GPU Support How to Change Docker’s Default Data Directory
and New IoT Capabilities May 26, 2024
June 4, 2024
Copyright © 2024 Linuxiac
PRIVACY ABOUT US CONTACT US
https://linuxiac.com/how-to-install-docker-on-ubuntu-24-04-lts/ 14/14