CC_Rpt6
CC_Rpt6
Step 1: Log into the AWS account and search the Amazon EC2. Click on “Launch instance”
and name the instance.
Step 2: Under Network settings, allow both HTTP and HTTPS traffic from Internet.
Step 6: EC2 Instance Terminal or EC2 Instance Console will be opened and run the docker
commands.
Execute the command “sudo yum update-y” to update all the system packages and execute
the command “sudo yum install docker-y” to install docker.
Step 7: After successfully installing Docker, the command “sudo service docker start” was
executed for enabling it to run Docker containers and the command “sudo service docker
status” was executed to verify that the Docker service was running successfully.
Step 8: After verification, Ctrl + Z was pressed to terminate the status output and return to
the command prompt. The command “sudo su” was used to switch to the root user. The
command “docker version” was run to verify the installed Docker client and server versions.
Step 9: The command “docker pull nginx” was executed to download the latest official
Nginx image from the Docker Hub repository. The command “docker images” shows all
Docker images that are available locally.
Step 10: Run “docker run -d -p 80:80 nginx” starts a Nginx container and maps port 80 of
the container to port 80 on the host. The command “docker ps” lists all currently running
Docker containers.
Step 11: Copy the public IPv4 Address to a new tab to view the running nginx application.