Hargun SE Exp-08
Hargun SE Exp-08
Hargun SE Exp-08
EXPERIMENT NO. 8
For multiple reasons; but in terms of CI/CD it can help Engineers separate Configuration from
Code, decrease the amount of time spent doing dependency management etc., can use it to scale
(with the help of some other tools of course). The list goes on. For example: If I had a single code
repository, in my build script I could pull in environment specific dependencies to create a
Container that functionally behaves the same in each environment, as I'm building from the same
source repository, but it can contain a set of environment specific certificates and configuration
files etc. Having said all of that, there really is a great deal you can do to utilize Docker in your
CI/CD Pipelines.
Containerization and its features:
Containers are made possible by operating system (OS) process isolation and virtualization, which
enable multiple application components to share the resources of a single instance of an OS kernel
in much the same way that machine virtualization enables multiple virtual machines (VMs) to
share the resources of a single hardware server. Containers offer all the benefits of VMs, including
application isolation, cost-effective scalability, and disposability. But the additional layer of
abstraction (at the OS level) offers important additional advantages: o Lighter weight: Unlike
VMs, containers don’t carry the payload of an entire OS instance—they include only the OS
processes and dependencies necessary to execute the code.
o Greater resource efficiency: With containers, you can run several times as many copies of
an application on the same hardware as you can using VMs. This can reduce your cloud spending.
o Improved developer productivity: Compared to VMs, containers are faster and easier to
deploy, provision, and restart. This makes them ideal for use in continuous integration and
continuous delivery (CI/CD) pipelines and a better fit for development teams adopting Agile and
DevOps practices.
What is docker image?
A Docker image is a read-only template that contains a set of instructions for creating a container that
can run on the Docker platform. It provides a convenient way to package up applications and
preconfigured server environments, which you can use for your own private use or share publicly
with other Docker users.
Is docker image and VM same?
Containers and virtual machines have similar resource isolation and allocation benefits, but
function differently because containers virtualize the operating system instead of hardware.
Academic Year: 2023-24 Sap ID: 60003210174
Containers are more portable and efficient. Containers Virtual Machines Containers are an
abstraction at the app layer that packages code and dependencies together. Multiple containers can
run on the same machine and share the OS kernel with other containers, each running as isolated
processes in user space. Containers take up less space than VMs (container images are typically
tens of MBs in size), can handle more applications and require fewer VMs and Operating systems.
Virtual machines (VMs) are an abstraction of physical hardware turning one server into many
servers. The hypervisor allows multiple VMs to run on a single machine. Each VM includes a full
copy of an operating system, the application, necessary binaries and libraries - taking up tens of
GBs. VMs can also be slow to boot Steps of Installation:
• The following hardware prerequisites are required to successfully run WSL 2 on
Windows
10 or Windows 11: o 64-bit processor with Second Level Address Translation (SLAT) o
4GB system RAM o BIOS-level hardware virtualization support must be enabled in
the BIOS settings. For more information, see Virtualization.
• Download and install the Linux kernel update package.
After installation in command prompt execute this command if you are getting error for linux kernel
QUESTIONS:
1. Explain the concept of a Docker container and its key components.
2. How does Docker facilitate the development and deployment of applications?
OUTPUT:
Screenshots of every step
REFERNCE:
https://www.tutorialspoint.com/