Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions I190431-Muhammad-Bin-Awais.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#225

Q1) Explain Docker Containers vs VMs

Docker containers are a lightweight and efficient way to package and run applications, making them suitable for modern, agile, and scalable software development. VMs provide stronger isolation and are a good choice when you need to run different OS versions or have specific hardware requirements.

Isolation :
Virtual Machines (VMs): Each VM runs its own operating system with its own kernel and resources, providing strong isolation between VM instances.
Docker Containers: Containers share the host kernel, isolating applications and dependencies within the container while sharing the underlying kernel, making them lightweight.

Resource Efficiency :
Virtual Machines (VMs): VMs are resource-intensive, with fixed resource allocations for each instance.
Docker Containers: Containers are resource-efficient, with burstable memory that can expand and shrink as needed. They are lightweight due to sharing host resources.

Startup Time :
Virtual Machines (VMs): VMs take longer to start because they need to boot an entire operating system.
Docker Containers: Containers start up almost instantly since they don't require booting a full OS.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DIdn't mention anything for libraries, how application packaging works

Q2)
For this question I have used these commands.

docker --version
docker run -d --name assignment-2-I190431 -p 9090:80 --network assignment-2 nginx:1.24.0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your screenshot gives error network-2 not found, so this wasn't able to run

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should have created the network-2 first and then run

Binary file added img1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.