Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

How To Install and Configure Docker in Ubuntu?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Docker is a platform and service-based product which utilizes OS-level virtualization to deliver software in packages called containers. Containers are separated from one another and bundle their own software, libraries, and configuration files. Docker is written in the Go language. Docker can be installed in two versions Docker CE(Community Edition) and Docker EE(Enterprise Edition). For small-scale projects, or for learning, we can use Docker CE.

Steps for Installing Docker

Step 1: Update Software Repositories using the following command on the terminal.

$ sudo apt update

Step 2: Install Docker using the following command

$ sudo apt install docker.io -y
Install docker

 

 Step 3: Enable and start the docker service by using the following commands.

$ sudo systemctl enable docker
Enable docker

 

$ sudo systemctl start docker
Start docker

 

 Step 4: Check Docker Version.

$ docker --version

Step 5: We will get a permission denied error as a regular user doesn’t have permission to execute docker commands, so we need to add an Ubuntu user to the docker group. 

#sudo usermod -aG docker $USER
    or 
#sudo usermod -aG docker ubuntu

Step 6: Leave the current SSH terminal and re-login with SSH. then carry out.

docker ps
Docker Version

 

My Personal Notes arrow_drop_up
Last Updated : 27 Apr, 2023
Like Article
Save Article
Similar Reads