How to Install Docker on Ubuntu

To install Docker on Ubuntu, you can follow the simple steps below:

  1. Update the apt package index:
  2. sudo apt-get update
  3. Install the packages necessary to allow apt to use a repository over HTTPS:
  4. sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
  5. Add Docker’s official GPG key:
  6. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  7. Set up the stable Docker repository:
  8. echo "deb [arch=amd64 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
  9. Update the apt package index again:
  10. sudo apt-get update
  11. Install Docker:
  12. sudo apt-get install docker-ce docker-ce-cli containerd.io
  13. Verify that Docker has been installed correctly:
  14. sudo docker run hello-world

This should display a message confirming that Docker has been installed and is running correctly.

That’s it, docker is installed.

0 Comments

Leave a reply

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

*

©2023 ZMATECH: Innovative solutions for your IT challenges.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

Log in with your credentials

Forgot your details?