Containerization-and-DevOps

UNIVERSITY OF PETROLEUM AND ENERGY STUDIES (UPES)

Containerization and DevOps

Lab File

Submitted to:
Mr. Prateek Raj Gautam

Submitted by:
Siddharth Negi
R2142231376
SAP ID: 500121910


Experiment – 2

Docker Installation, Configuration, and Running Images


Objective


Procedure

Step 1: Pull Image

docker pull nginx

alt text

Step 2: Run Container with Port Mapping

docker run -d -p 8080:80 nginx

alt text

Step 3: Verify Running Containers

docker ps

alt text

Step 4: Stop and Remove Container

docker stop <container_id>
docker rm <container_id>

alt text

Step 5: Remove Image

docker rmi -f nginx

alt text

Result

Docker images were successfully pulled, containers executed, and lifecycle commands performed.


Overall Conclusion

This lab demonstrated virtualization using Vagrant + VirtualBox and containerization using Docker, highlighting performance and resource efficiency differences. Containers are better suited for rapid deployment and microservices, while VMs provide stronger isolation.