0% found this document useful (0 votes)
5 views6 pages

Containerization with Docker Guide

Uploaded by

thakureshan7
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Containerization with Docker Guide

Uploaded by

thakureshan7
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Name: Anushka Thakur Roll No: 49

Class: COMPS Batch: B3

Experiment No: 10
Aim:To study and Implement Containerization using Docker.

● Before downloading the Docker application, we require WSL (Windows Subsystem for
Linux)
● Docker doesn’t support Windows; to solve this problem, we have to install the WSL
What is containerization?
Containerization is a software deployment process that bundles an application’s code with all the
files and libraries it needs to run on any infrastructure. Traditionally, to run any application on your
computer, you had to install the version that matched your machine’s operating system. For
example, you needed to install the Windows version of a software package on a Windows
machine. However, with containerization, you can create a single software package, or container,
that runs on all types of devices and operating systems.

What are the benefits of containerization?


Developers use containerization to build and deploy modern applications because of the following
advantages.

Portability
Software developers use containerization to deploy applications in multiple environments without
rewriting the program code. They build an application once and deploy it on multiple operating
systems. For example, they run the same containers on Linux and Windows operating systems.
Developers also upgrade legacy application code to modern versions using containers for
deployment.

Scalability
Containers are lightweight software components that run efficiently. For example, a virtual
machine can launch a containerized application faster because it doesn't need to boot an
operating system. Therefore, software developers can easily add multiple containers for different
applications on a single machine. The container cluster uses computing resources from the same
shared operating system, but one container doesn't interfere with the operation of other
containers.

Fault tolerance
Software development teams use containers to build fault-tolerant applications. They use multiple
containers to run microservices on the cloud. Because containerized microservices operate in
isolated user spaces, a single faulty container doesn't affect the other containers.
This increases the resilience and availability of the application.
What is the Windows Subsystem for Linux?
WSL stands for Windows Subsystem for Linux. It is a compatibility layer in Windows 10 and later
versions that enables users to run Linux executables natively on Windows without the need for
virtual machines or dual-boot setups. WSL allows developers and users to access Linux tools,
Name: Anushka Thakur Roll No: 49
Class: COMPS Batch: B3
utilities, and applications directly within the Windows environment, facilitating seamless
integration between Windows and Linux workflows.

What is Docker?
Docker is an open platform for developing, shipping, and running applications. Docker enables
you to separate your applications from your infrastructure, so you can deliver software quickly.
With Docker, you can manage your infrastructure in the same way you manage your applications.
By taking advantage of Docker's methodologies for shipping, testing, and deploying code, you
can significantly reduce the delay between writing code and running it in production. Architecture

1. To download the WSL, we just need to copy and paste the command in the
windows PowerShell, which is provided by Microsoft.

2. Visit Install WSL | Microsoft Learn and copy the command, open the Windows
PowerShell as Administrator and paste the command.
Name: Anushka Thakur Roll No: 49
Class: COMPS Batch: B3

3. It will download Ubuntu Linux onto your system (it may take longer to download
and install Ubuntu, depending on your internet speed).
4. After successfully downloading and installing Ubuntu, restart your system to
reflect the changes in your system.

5. Now visit Install Docker Desktop on Windows | Docker Docs and download the
Docker Application for Windows.

6. After downloading the Docker, install it. (Optional) restart your system.
Name: Anushka Thakur Roll No: 49
Class: COMPS Batch: B3

● After all these steps, we need a project to make the container for that project, so I
have created a demo project to perform the containerization.

● The project is simple [Link] and [Link] project that renders the html and css
file to the home page
7. Download the zip file, extract the project from it Project Link and open VS Code.

8. I have returned a Docker script in the Dockerfile file, which creates a container file
for our project.
Name: Anushka Thakur Roll No: 49
Class: COMPS Batch: B3

9. Use the following commands to create a container and run the container
a. $ docker build -t simple-node-project .

b. $ docker run -it -p 8080:8080 simple-node-project

10. The project is running from the container


Name: Anushka Thakur Roll No: 49
Class: COMPS Batch: B3

You might also like