How to install docker on ubuntu vm

The provided steps outline the process of installing Docker on an Ubuntu virtual machine (VM). Docker is a popular platform for developing, shipping, and running applications using containerization technology.
Written by teamember02
Updated 8 months ago

To install Docker on an Ubuntu VM, you can follow these steps:

  1/  Update apt package index: 

       sudo apt update

2/  Install dependencies to allow apt to use a repository over HTTPS:

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

3/ Add Docker’s official GPG key:

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

4/ Set up the Docker repository: For Ubuntu 20.04:

   sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"

5/ Update the apt package index again:

   sudo apt update

6/ Install the latest version of Docker CE (Community Edition):

    sudo apt install docker-ce

7/ Verify Docker installation by running a simple container:

    sudo docker run hello-world

Did this answer your question?