Installing Docker on Ubuntu

Installing Docker on Ubuntu is a straightforward process that can be completed in just a few steps.

  1. Start by updating your system’s package index by running the following command in the terminal:
Copy codesudo apt-get update
  1. Next, install the necessary packages for adding the Docker repository to your system by running the following command:
Copy codesudo apt-get install apt-transport-https ca-certificates curl software-properties-common
  1. Add the Docker repository to your system by running the following command:
Copy codecurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  1. Add the Docker repository to your system’s software sources by running the following command:
Copy codesudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  1. Update your system’s package index again by running the following command:
Copy codesudo apt-get update
  1. Finally, install Docker by running the following command:
Copy codesudo apt-get install docker-ce

You can verify that Docker is installed and running by running the following command:

Copy codesudo systemctl status docker

You can also run a simple test by running the “hello-world” image with the following command:

Copy codedocker run hello-world

You now have Docker installed on your Ubuntu system and you can use it to run containerized applications.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *