Install Docker on Ubuntu 24.04 LTS
- Update and reboot the container with
apt update && apt upgrade -y && reboot
Step 1: Install Required Packages
Step 2: Add Docker’s Official GPG Key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
Step 3: Set Up Docker’s Stable Repository
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" | tee /etc/apt/sources.list.d/docker.list > /dev/null
Step 4: Install Docker Engine on Ubuntu 24.04 LTS
In addition, check its status using the command below to confirm that everything is as expected:
Uninstall Docker Engine
Install Docker Engine on Ubuntu 24.04 LTS
apt purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
Then, manually remove the following two directories: