LOGIN
Sign In or Register
Avatar
Not Registered Yet?

Join Now! It's FREE. Get full access and benefit from this site

Reset My password - Remind Me My username

Username
Password
Remember me

How to Install Docker in Linux?

How to Install Docker in Linux?
 
Note - You should install Docker using root or with sudo access.
 
Install Docker on Ubantu 
# apt-get update
# apt-get install -y docker.io
# service docker.io start
 
Install Docker on Redhar / Centos
# yum update
# yum install -y docker.io
# systemctl start docker.service
 
How to verify the version of docker?
# docker -v
# docker version
 
How to know docker running?
# service docker.io status (Ubantu)
# systemctl status docker.service (Redhat)
 
How to check details of Docker clients, deamon, containers, images, drivers, etc
# docker info
 
How to update Docker version?
==============================================
# wget -q0- https://get.docker.com/gpg | apt-key add -
# echo deb http://get.docker.com/ubantu docker main > /etc/apt/sources.list.d/docker.list
# apt-get update
# apt-get install lxc-docker
# docker version
 
Configuration post docker installation:
Adding Users to the Docker Group for non-root user
==============================================
# docker run -it ubuntu /bin/bash (as a non-root)
[ permission denied]
# cat /etc/group
# sudo gpasswd -a username docker
# cat /etc/group
# docker run -it ubuntu /bin/bash (as a non-root)
# logout
# login username
Rate this item
(0 votes)
Rajesh Kumar

.

Total, Over 12 years of extensive experience in the Software Configuration Management domain having depth knowledge of DevOps, Continuous Integration and Delivery, Configuration Management, Build and Installer, Release Management and Application Management.