To install Docker on Ubuntu 23.04 you need to make sure that you meet the prerequisites. You need the 64-bit version of Ubuntu 23.04 and Docker Engine that is compatible with x86_64 (or amd64), armhf, arm64, and s390x architectures.
Prerequisites
- sudo privileges
Install Docker on Ubuntu 23.04
Step 1. Uninstall any older versions of Docker that may be installed on your system by running the following command.
sudo apt-get remove docker docker-engine docker.io containerd runc
Step 2. Set up the Docker repository by updating the apt package index and installing packages.
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg
Step 3. Add Docker’s official GPG key.
sudo mkdir -m 0755 -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
Step 4. Set up the repository by running 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
Step 5. Install the Docker Engine.
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
After installation, you can start using Docker by running docker
commands in a terminal.
Conclusion
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.