How to install Docker Desktop on Ubuntu

How to install Docker Desktop on Ubuntu

  1. First, update your system's package list using the following command:
sql
sudo apt-get update
  1. Next, install some prerequisite packages that allow the use of packages over HTTPS:
arduino
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
  1. Import the Docker GPG key using the following command:
arduino
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  1. Add the Docker repository to your system's APT sources:
bash
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  1. Update the package list again:
sql
sudo apt-get update
  1. Finally, install Docker Desktop:
arduino
sudo apt-get install docker-ce docker-ce-cli containerd.io
  1. To verify that Docker Desktop has been installed successfully, run the following command:
arduino
sudo docker run hello-world

This command will download a small Docker image and run it in a container, displaying a "Hello from Docker!" message if everything is working correctly.

That's it! You now have Docker Desktop installed on your Ubuntu system.

Comments

Popular posts from this blog

Solved: Error, Could not get lock /var/lib/apt/lists/lock. It is held by process (PID) (packagekitd)

How to install docker desktop in windows 10, 11