Docker
As we've already learned in Chapter 7, Evaluating the Best Architecture, Docker is a Linux-based container technology. It allows your distributed applications to build, run, test and deploy. The Amazon EC2 Container Service provides container-based services that use Docker images in their task definitions and start containers on an EC2 instance.
Let's look at an example of Docker. You will install Docker, create a Docker image, and verify a simple web page.
Docker is currently available for different operating systems, such as Linux distributions, Windows, and macOS. You can launch an EC2 Linux instance, if you have any, and install Docker. You can use Docker without a local machine.
The following are the steps to install a Docker image on the instance of an Amazon Linux-based AMI:
- Launch an Amazon Linux AMI instance and connect to it.
- Execute the following command to update the installed package. It will also cache on the instance:
sudo yum update –y
- Now, execute the following command...