0% found this document useful (0 votes)
0 views

CC_Rpt6

The document outlines the steps for migrating a web application to Docker containers using AWS EC2. It includes instructions for launching an instance, configuring network settings, installing Docker, and running an Nginx container. Finally, it details how to verify the setup and clean up by deleting the instance and key pair.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

CC_Rpt6

The document outlines the steps for migrating a web application to Docker containers using AWS EC2. It includes instructions for launching an instance, configuring network settings, installing Docker, and running an Nginx container. Finally, it details how to verify the setup and clean up by deleting the instance and key pair.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

1BI22CS011 Cloud Computing Lab

Program 6: Migrating a Web Application to Docker Containers.

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.

Dept. of CSE, BIT 2024-2025 1


1BI22CS011 Cloud Computing Lab

Step 3: Create a “KeyPair”.

Step 4: The instance is created.

Dept. of CSE, BIT 2024-2025 2


1BI22CS011 Cloud Computing Lab

Step 5: Click on it and select connect.

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.

Dept. of CSE, BIT 2024-2025 3


1BI22CS011 Cloud Computing Lab

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.

Dept. of CSE, BIT 2024-2025 4


1BI22CS011 Cloud Computing Lab

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.

Dept. of CSE, BIT 2024-2025 5


1BI22CS011 Cloud Computing Lab

Step 11: Copy the public IPv4 Address to a new tab to view the running nginx application.

Dept. of CSE, BIT 2024-2025 6


1BI22CS011 Cloud Computing Lab

Step 12: Select the instance and delete it.

Step 13: Delete the key pair as well

Dept. of CSE, BIT 2024-2025 7

You might also like