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
9 changes: 9 additions & 0 deletions assignment-2/I20-0445-SAFA-KHAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Answer 1:
Containers are more resource-efficient since they share the host operating system. This results in lighter and more portable containers that consume fewer resources, leading to faster application startup and scaling. In contrast, virtual machines come with a complete operating system, which consumes CPU and memory resources, making them heavier in resource usage due to the overhead of running multiple guest OS instances.
Another distinction lies in how data is managed. Containers do not inherently provide persistent data storage but can achieve it through methods like disk mounting or using volumes. On the other hand, VMs offer dedicated memory for data storage.
The final difference pertains to isolation. VMs provide strong isolation through separate guest OS instances, which is critical for security but comes at the cost of resource intensity. Containers, in contrast, share the host OS kernel, providing lower isolation. This makes them suitable for shared environments but less ideal for handling sensitive or multi-tenant workloads.
Answer 2:
docker network create assignment-2
docker run -d --name assignment-2-I20-0407 -p 9090:80 --network assignment-2 nginx:1.24.0
Answer 3:
![Alt text](image.png)
Binary file added assignment-2/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.