From 4e6a828e0702808fc022148edc49064a1253855a Mon Sep 17 00:00:00 2001 From: Hassan-520 Date: Sun, 8 Oct 2023 22:11:58 +0500 Subject: [PATCH] Commit Done --- I190511-Muhammad-Hassan-Rana.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 I190511-Muhammad-Hassan-Rana.md diff --git a/I190511-Muhammad-Hassan-Rana.md b/I190511-Muhammad-Hassan-Rana.md new file mode 100644 index 000000000..fcc098a4d --- /dev/null +++ b/I190511-Muhammad-Hassan-Rana.md @@ -0,0 +1,7 @@ +Q1: Explain Docker Containers vs VMs? +Docker containers are lightweight, isolated environments that share the host OS kernel, making them more efficient in terms of resource usage and faster to start compared to virtual machines (VMs). VMs, on the other hand, run full OS instances, making them heavier and slower to start but providing stronger isolation and compatibility with different OSes. + +Q2: Write command to create a docker container in detached mode with name assignment-2- 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-I190511 -p 9090:80 --network assignment-2 nginx:1.24.0 + +Q3: Run the above command and add screenshot of it and share the logs