Docker is a tool that uses containers to package an application with all of its libraries and other dependencies and ship it all out as one package:
- We will PuTTY into our ec2 instance with the built-in user for our current AMI, that is, the centos user, with the help of the following command:
[centos@ip-172-31-95-213 ~]$ sudo su
[root@ip-172-31-95-213 centos]# cd /usr/local/src/
- You must check whether Docker is installed. If it is not installed, then you can get it installed with the help of the following command:
[root@ip-172-31-95-213 src]# yum install -y yum-utils device-mapper-persistent-data lvm2
[root@ip-172-31-95-213 src]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
[root@ip-172-31-95-213 src]# yum install docker-ce
- During the installation, type y (=Yes) on the terminal if you are asked any questions, as shown in Figure 6.1:
Figure 6.1 – Installing Docker
- Add your user to the docker group with the help of...