How to Install Docker on Ubuntu 24.04 LTS

In this article, we’ll guide you through the process of installing Docker on Ubuntu 24.04 LTS (Noble) | Install Docker on Ubuntu 24.04 LTS.

Docker is a popular platform that allows developers and IT professionals to automate the deployment of applications inside lightweight containers. By isolating applications and their dependencies,

Docker ensures consistency across different environments, from development to production. Whether you’re looking to streamline your development workflow or manage scalable infrastructures, Docker is an essential tool. Follow along as we cover the installation steps, ensuring you can get Docker up and running on your Ubuntu 24.04 system with ease.

Prerequisites

  • Ubuntu 24.04 LTS with minimal installation
  • SSH Access with admin privileges

Install Docker on Ubuntu 24.04 LTS

Step #1:Update the Package Index

sudo apt-get update

Step #2:Install Required Dependencies

Install some essential packages like ca-certificates and curl, which are necessary for adding the Docker GPG key:

sudo apt-get install ca-certificates curl

Step #3:Add Docker’s Official GPG Key on Ubuntu 24.04 LTS

Docker requires a GPG key to verify the authenticity of its packages. First, create a directory for the keyrings, download the GPG key, and adjust the permissions:

sudo install -m 0755 -d /etc/apt/keyrings

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

sudo chmod a+r /etc/apt/keyrings/docker.asc

Step #4:Add the Docker Repository on Ubuntu 24.04 LTS

Now, add Docker’s repository to your APT sources list. This step ensures that you download Docker packages directly from Docker’s official repository:

echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Step #5: Update the Package Index Again

sudo apt-get update

Step #6:Install Docker on Ubuntu 24.04 LTS

With the repository set up, you can now install Docker and its associated components:

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

Step #7:Verify Docker Installation on Ubuntu 24.04 LTS

Once Docker is installed, verify that it’s up and running:

sudo systemctl status docker
How to Install Docker on Ubuntu 24.04 LTS 1

Step #8:Test the Docker Installation

To ensure Docker is installed and functioning properly, run the following test:

sudo docker run hello-world
How to Install Docker on Ubuntu 24.04 LTS 2

This command will download and run a test Docker container, confirming that everything is working as expected.

Step #9:Check Docker Images and Containers

To see a list of Docker images currently on your system, run:

sudo docker images
How to Install Docker on Ubuntu 24.04 LTS 3

To view all containers, including both running and stopped containers, use:

sudo docker container ls -a
How to Install Docker on Ubuntu 24.04 LTS 4

Conclusion:

In this guide, we’ve walked through the process of installing Docker on Ubuntu 24.04 LTS, from setting up necessary dependencies to verifying the installation and managing Docker images and containers.

Docker is an essential tool that simplifies application deployment, making it easier to develop, ship, and run software in a consistent environment. Whether you’re using Docker for development or in production, this installation ensures that you are ready to start creating and managing containers on your Ubuntu system. With Docker up and running, you can now explore its full range of capabilities to streamline your workflow and improve system efficiency.

Related Articles:

How to Install Docker on Ubuntu 24.04 with Shell Script

Reference:

Install Docker Engine on Ubuntu official page

Harish Reddy

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share via
Copy link
Powered by Social Snap