Install Docker from the Default CentOS 7 Repository


After logging into the server, install the latest version of Docker using yum.

$ sudo yum -y install docker

Once installation completes, enable & start the service using systemd.

Create a new group named docker, then add the cloud_user user to the group.

 

# groupadd docker
# usermod -aG docker cloud_user
# systemctl enable –now docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd
/system/docker.service.
[root@ip-10-0-1-121 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES

Logout from Root

ssh cloud_user@youripaddress
Enter the password

[cloud_user@ip-10-0-1-121 ~]$ ssh cloud_user@10.0.1.121
The authenticity of host ‘10.0.1.121 (10.0.1.121)’ can’t be established.
ECDSA key fingerprint is SHA256:URC6viTN+8b87rv0V7t9lsCDiq5fwAlguWIYtQSbfCI.
ECDSA key fingerprint is MD5:ac:49:84:5e:c2:53:c7:d1:a2:d8:70:80:61:31:df:60.
Are you sure you want to continue connecting (yes/no)? y
Please type ‘yes’ or ‘no’: yes
Warning: Permanently added ‘10.0.1.121’ (ECDSA) to the list of known hosts.
Password:
[cloud_user@ip-10-0-1-121 ~]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES

Docker is Installed and available to test

Published by Aryan Nava

Founder of "BlockchainMind", CTO for two Blockchain startup during 2018, Cloud/DevOps Consultant and Blockchain Trainer

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: