How To Install Docker on Ubuntu 23.04

Dec 02, 2023

To install Docker on Ubuntu 23.04, follow the steps below:

Step 1 : Ensure that your package list and installed packages are up to date by running the following commands:

sudo apt update

Step 2 : Install the necessary packages that allow apt to use a repository over HTTPS:

sudo apt install apt-transport-https ca-certificates curl software-properties-common

Step 3 : Add Docker's official GPG key to ensure the integrity of the packages:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Step 4 : Set up the stable Docker repository:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Step 5 : Update the package list to include the Docker packages:

sudo apt update

Step 6 : Install Docker from the Docker repository:

sudo apt install docker-ce

Step 7 : Verify the Installation:

Ensure Docker is installed correctly by running:

sudo docker --version

Step 8 : Verify Docker Compose:

Check Docker Compose version to ensure it's installed:

docker compose version

Step 9 : Test Docker:

Run a simple Docker container to verify the installation:

sudo docker run hello-world

Congratulations! You have successfully installed Docker on Ubuntu 23.04. You can now start using Docker to manage and deploy containerized applications.