Article
Install Docker in Ubuntu Linux
Jan 10, 2023
Vineel Sai
![]()
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.
bashsudo apt update
- Install required dependencies
bashsudo apt install ca-certificates curl gnupg lsb-release
Setup GPG Key
bashsudo mkdir -p /etc/apt/keyrings
- Add GPG keys to keyrings folder
bashcurl -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
bashecho "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.
bashsudo apt update
- Install docker
bashsudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Post Install
bashsudo usermod -aG docker $USER
Other Operating Systems
-
If you want to install Docker in other linux distributions check out the following links