This document explains the steps required to install Docker on the Ubuntu 24.04 operating system. By following these instructions, Docker can be deployed and configured properly on the server environment.
First, the system packages must be updated. Run the following commands in sequence:
sudo apt update
sudo apt upgrade -y
Install the necessary packages needed for Docker installation by executing the command below:
sudo apt install ca-certificates curl gnupg lsb-release -y
Add the official Docker GPG key to verify the authenticity of Docker packages:
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
Add the official Docker repository using the following command:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Update the package list with the newly added repository:
sudo apt update
Install Docker Engine and its related components by running:
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
After installation, start the Docker service and enable it to run at system startup:
sudo systemctl start docker
sudo systemctl enable docker
Check the service status with the command below:
sudo systemctl status docker
Run the following command to confirm the installation is successful:
sudo docker run hello-world
If this command executes successfully, a message confirming that Docker is installed and working will appear.
The installation process is now complete. The server is ready to run containerized applications using Docker.
You can click here for our Ubuntu operating system servers where you can install Docker.
You have examined the knowledge base in detail, but if you cannot find the information you need,
Create a Support Ticket