Discover how to install Docker on Ubuntu 24.04 LTS.
This is going to be a step-by-step procedure on how to Install Docker on Ubuntu 24.04 LTS.
These are the steps outlines in my video.
1) Login as super user
sudo su
2) Update the apt package index
apt-get update
3) Add Docker's official GPG key
apt-get install ca-certificates curl
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubu... | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
Installs the ca-certificates and curl packages
ca-certificates: Provides a set of trusted CA (Certificate Authority) certificates used to verify SSL/TLS connections.
curl: A command-line tool for transferring data from or to a server using protocols like HTTP, HTTPS, FTP, etc.
Creates the /etc/apt/keyrings directory if it doesn't already exist. The -p option ensures no error is thrown if the directory exists.
Downloads Docker's official GPG key and converts it into a binary format
Sets the permissions of the docker.gpg file so that all users have read access to it.
chmod a+r: Adds read permissions (r) for all users (a).
3) Add the repository to Apt sources
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
4) Upgrade the apt package index and any new packes that you just installed
apt-get update && sudo apt-get upgrade
This message is related to the needrestart utility, which is often installed on Ubuntu to check for services, user sessions, and virtual machines that need to be restarted after updates or configuration changes.
5) Install the latest Docker packages
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
6) Verify if the docker engine is properly install
sudo docker run hello-world
#linux #ubuntu #docker