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 *

*

©2025 ZMATECH: Innovative solutions for your IT challenges.

Log in with your credentials

Forgot your details?