This page looks best with JavaScript enabled

Install Docker in Ubuntu Linux

 ·  ☕ 2 min read

docker ubuntu

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker , you can manage your infrastructure in the same ways you manage your applications. In the following article, you will know how to install docker in Ubuntu

Prerequisites

Dependencies

  • Update the system.
1
sudo apt update
  • Install required dependencies
1
sudo apt install ca-certificates curl gnupg lsb-release

Setup GPG Key

  • Add official docker GPG keys to your system
  • Make keyrings folder
1
sudo mkdir -p /etc/apt/keyrings
  • Add GPG keys to keyrings folder
1
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

Setup Docker Repository

  • Add docker download repository to your system
1
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Install Docker

  • Update the system.
1
sudo apt update
1
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin

Post Install

  • Add a docker to the user group to use the docker command without sudo
1
sudo usermod -aG docker $USER

Other Operating Systems

Share on
Support the author with
bitcoin QR Code

Vineel Sai
Vineel Sai
Vineel Sai