Install Docker on Ubuntu

by RamWise
Published: Last Updated on 1K views

Installing Docker on Ubuntu

Docker is a containerization platform for creating and deploying containers. Here we’ll see how to install it on Ubuntu operating system.

There are two sections here. First to set up the repositories to download Docker, second to install it.

Set Up the Repository

1. Install packages required to connect to Docker package repository

sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release 

2. Add Docker repository public key

 curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

It will report if the key is added successfully.

Post 7 Docker Key Add

3. Add the Docker package repository

sudo add-apt-repository "deb [arch=armhf] $(lsb_release -cs) stable" 

It will successfully read packages list from the repository with this command .

Install Docker

1. Update packages index and install Docker and dependencies with the below two commands.

sudo apt-get update 
sudo apt-get install docker-ce docker-ce-cli 

The last command will install everything and start the Docker services.

2. Now that docker is installed you can check if it is running.

sudo systemctl status docker 

That is it! You are all set to run your docker containers.

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More