Assignment22
Assignment22
DEPARTMENT: IT.
SEMESTER: 7TH.
DATE: 07-November-2024
Questions:
1. Explain Containers in Detail:
Containers
Containers work as small, portable “boxes” or “packages”. Containers don’t need a full
operating system in each box. In a container, there is everything that an app needs to run
like its code, libraries, and dependencies and everything is packed inside a portable box.
When you take this box to another computer it does not need its own Operating system
infact it borrows the OS of the host computer.
Working on Container
Namespaces and cgroups are two technologies that containers use to make separate settings
on the same operating system. This lets different containers run on their own without
messing with each other.
A Docker software is installed on the computer and then the container image of an app is created in a
file using the Docker software.
The file is then transferred to the other computer that already has installed the Docker software on it
and then the container image is loaded using container runtime which makes a perfect environment on
the container for the app to run and it uses the same operating system as the Host computer.
Containers benefits
Lightweight: Containers share the host OS kernel, which makes them smaller and faster
to start compared to virtual machines (VMs).
Portability: Containers encapsulate all dependencies and configurations, allowing
applications to run consistently across different environments without needing their own
OS.
Isolation: Each container runs in its own separate environment, which keeps apps and
their dependencies from running into problems with each other.
Scalability: Containers can be easily increased and decreased on demand, making it simple
to handle varying workloads.
3. Comparison Table
Containers Virtual Machines (VMs)