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
18 changes: 18 additions & 0 deletions I20-0655-Muhammad-Dayyan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

(Q1) Explain Docker Containers vs VMs

Docker Containers:

-Imagine a container as a lightweight, portable box. -Containers share the same underlying operating system, like everyone using the same computer. -They are very efficient because they only contain the specific files and settings needed for a single application. -Containers start up quickly, in seconds. -Think of them like individual apps on your smartphone; they're isolated and don't interfere with each other. -Containers are perfect for packaging and running one application at a time, making them efficient and portable.

Virtual Machines (VMs):

-Visualize a VM as a full-fledged computer within your computer. -VMs have their own complete operating system, like having multiple physical computers on one machine. -They can be resource-heavy because each VM duplicates the entire OS. -VMs take longer to start, often minutes. -It's like running multiple physical computers on your desk, each with its own software. -VMs are versatile, allowing you to run multiple applications or even different operating systems on the same hardware.

(Q2) Write command to create a docker container in detached mode with name assignment-2-<ROLL_NUMBER> running on host port 9090 and container port 80 using image nginx with version 1.24.0 on a custom network named assignment-2

-docker run -d --name assignment-2-I20-0655 -p 9090:80 --network assignment-2 nginx:1.24.0

(Q3) Run the above command and add screenshot of it and share the logs

![Alt text](first-contributions/screenshot.png)
1 change: 1 addition & 0 deletions first-contributions
Submodule first-contributions added at 67db8a
Binary file added screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.