You are on page 1of 5

Labs On Docker

Department of Computer Science and Engineering, JNEC Aurangabad​.

Palash Khaire`, Akshay Saswadkar`, Rajesh Jaybhaye`, Abhilash Ghope`,


Atul Dusane``

Abstract: ​The need for shipping application each container can have strong isolation,
to labs is becoming very important in own network stack, storage stack, file
schools and colleges as it saves time and system and resource management
effort. Docker Lab is a system that ship capabilities to allow friendly co-existence
containers from one Linux based machine of multiple containers on a single host. A
to another, without worrying about any container does not have its own operating
dependencies. It means that application system as it shares the same kernel;
created and packaged into a container with however, it contains all binaries and
docker and then deployed it on a Linux libraries to run an application inside it.. In a
Environment. way, Docker is a bit like a virtual machine.
But unlike a virtual machine, rather than
Keywords: ​Docker, Linux (OS), MySQL, creating a whole virtual operating system,
Shell scripting, Containers, Apache2, VM. Docker allows applications to use the same
Linux kernel as the system that they're
running on and only requires applications
be shipped with things not already running
I. INTRODUCTION
on the host computer. This gives a
significant performance boost and reduces
the size of the application. And
Docker ​Docker is an open-source engine
importantly, Docker is ​open source ​. This
that automates the deployment of
means that anyone can contribute to
applications into containers. Containers
Docker and extend it to meet their own
provide an isolated environment akin to
needs if they need additional features that
virtualization, but without virtual hardware
aren't available out of the box. Docker is a
emulation. Docker is developed by Docker,
tool that is designed to benefit both
Inc., which was previously known as
developers and system administrators,
dotCloud, Inc. that was one of the
making it a part of many DevOps
pioneering company in
(developers + operations) toolchains. For
Platform-as-a-service market. Docker
developers, it means that they can focus on
provides an isolated container based on a
writing code without worrying about the
major Linux kernel feature known as
system that it will ultimately be running on.
cgroups and namespace. Consequently,
It also allows them to get a head start by so they could be portable
using one of the thousands of programs anywhere
already designed to run in a Docker ● Lightweight: Containers share the
container as a part of their application. For machine’s OS system kernel and
operations staff, Docker gives flexibility
therefore do not require an OS
and potentially reduces the number of
systems needed because of its small per application, driving higher
footprint and lower overhead. server efficiencies and reducing
server and licensing costs
● Secure: Applications are safer in
Docker Container: ​Docker Container is a containers and Docker provides
standardized unit which can be created on the strongest default isolation
the fly to deploy a particular application or capabilities in the industry
environment. It could be an Ubuntu
container, CentOs container, etc. to full-fill
the requirement from an operating system II. LITERATURE SURVEY
point of view. A container is a standard
unit of software that packages up the code Docker is a container virtualization
and all its dependencies so the application
technology. So, it’s like a very lightweight
runs quickly and reliably from one virtual machine [VM]. In addition to
computing environment to another. A building containers, they provide what they
Docker container image is a lightweight,
call a developer work, which is really about
standalone, executable package of software
helping people build containers and
that includes everything needed to run an
applications inside containers and then
application: code, runtime, system tools,
share those among their teammates.
system libraries, and settings.
Container images become containers at The container-based virtualization doesn't
runtime and in the case of Docker require each guest to run a completely
containers - images become containers installed operating system. This
when they run on ​Docker Engine​. virtualization approach also helps to
Available for both Linux and improve performance since there is a single
Windows-based applications, containerized operating system taking care of all hardware
software will always run the same, calls. The disadvantage of container-based
regardless of the infrastructure. Containers virtualization is that each guest must use the
isolate software from its environment and same operating system the host uses.
ensure that it works uniformly despite
differences for instance between For an ordinary VM which is running on a
development and staging. hypervisor(Type-1, Type-2), not only it
contains applications and necessary
Docker containers that run on Docker libraries and binaries but also an entire
Engine: copy of guest OS. This makes VMs to be

● Standard: Docker created the


industry standard for containers,
conventional hypervisor since additional
resources needed for each OS is
eliminated. In the scenario when a single
operating system is required, the
container-based virtualization is the best
fit. multiple instances of an operating
system and it does not duplicate
functionality. Each container instance
runs in a completely isolated secure
environment.

Container-based virtualization is more


resource efficient since all applications
Fig. container vs VM run on top of the same kernel and
instances are smaller and faster to create
of several GBs. On the contrary, Docker or migrate. It means a single system can
eliminates hypervisor and guest OS layer, potentially host more containers than
even the libraries can be shared by VMs but it limits the flexibility and
different applications running on top of it. choice of your operating systems. And a
This makes Docker a very lightweight single OS creates the situation of a single
VM and easy to deploy in less time point of failure for all of the containers.
Basically, it creates portable packages of Forex- a virus attack or crash of host OS
applications and its dependencies. The can impact all of the containers.
packages are called container images and
it can be published to a container IV. BENEFITS OF DOCKER
repository called Docker Hub so that it CONTAINERS
can be spawned and executed on any
other machine having Docker engine. Docker is a container technology which
Docker uses union file system where makes it easy to package and distribute
layers of a file system are built up. Only software along with its other
the specific changes added to the parent dependencies. It makes shipping of
image are saved. Hence, the size of the software code easy to staging or
image is very less(few KBs to MBs). As a production or any other environment.
result, publishing an image becomes very Docker is written in Go, an open source
lightweight and takes only a few seconds. programming language created in 2007 at
Also, spawning this image and getting the Google by Robert Griesemer, Rob Pike,
exact replica of VM takes only a few and Ken Thompson. The developer
seconds whereas ordinary VM cloning community is working aggressively on
takes up to a few minutes. Docker API which has 15 revisions made
so far in the past 1.5 years.
III. BENEFITS OF
CONTAINER BASED A​. Application Portability Docker puts all
VIRTUALIZATION application dependencies in a container
which is portable on different platforms.
Container-based virtualization improves The distributed applications can be built,
performance and efficiency compared to
move and run using containers. The running from where containers can be
application developers and administrators started stopped with one click only. The
can run the same application on laptops, data that they will be saving, will be
VMs or cloud by automating deployment saving in the server’s hard disk where the
inside containers. containers are running and mounted. After
using the container, it will get destroyed
B. Docker is lightweight and fast and all the contents you save will be
Containers are lightweight and fast deleted. As containers are isolated in
compared to Virtual Machine(VM) since nature. So the containers (GCC,
VMs boot an entire operating system to Netbeans) will be running on the server
start and consume resource as each VM side, which can be directly accessed by
has to run a full OS instance. However, the website provided.
starting a container is just like starting a
process. VI. DIFFERENT MODULES

C. Optimal resource utilization Docker This consists of mainly 2 modules. They


allows to allocate and limit CPU, are the frontend website and the backend
memory, network and disk resources to all server where the containers are running on
the process using Linux's Control Groups. the servers which, the website comprises
It ensures that one process is not taking of registration page and login page, the
over all of the computer resources and registration page has various details
starving the other processes. required for the registration and one
unique identification is kept as a college
registration number (6 digits). The same
will be required for logging in the website
V. PROPOSED SYSTEM for further use. The website is hosted
using apache2 on Debian based Linux OS.
All web clients communicate with HTML The site can be accessed by the IP
front end site providing the login page and address of the server, so the same can be
registration page. New users need to accessed by any user in the network. This
register for accessing the websites. After helps in the effective use of the website
registering, the credentials matched from and the containers. The website is
the database of clients will be redirected connected to a database on the backend
to the home or welcome page where they for storing the details of registered people
will have links for the containerized and for logging in the website again with
applications through which they can the same details. The database is
choose the specific link for accessing the connected to the website using Xampp for
containers and can use the containers as its connectivity. The second module is the
per their use. One admin panel will be server where containers are running in the
added for the website where one can just background where Docker is configured
check the details of users registered, and all the container images are stored in
people accessing the containers and all. the server. After logging in the site, it will
One administrative container will be redirect to Welcome page, from where
provided for the admin on the server side application residing in containers can be
to graphically manage the containers used just by clicking on it. All the data
created while using the application are
stored in the server and is accessible to [3]. ​Infrastructure for container projects-
all. https://linuxcontainers.org/

VII. CONCLUSION [4]. ​Understand the architecture of docker


https://docs.docker.com/engine/docker-ov
This paper presented the use of docker to erview/
deploy web applications in a container
which helps student and faculty to make [5]. ​J.Turnbull, The Docker Book:
use of applications without wasting time. Containerization is the new virtualization.
In this project, it is tried to impart too James Turnbull, 2014.
many of the small pieces of wisdom that
are picked up from running Docker in [6]. ​H. Philipp, W. Ingo, S. Stefan, Z.
production. Liming, and F. Alan. “Four-Fold
Auto-Scaling on a Contemporary
Our evaluation shows that the utilization Deployment Platform Using Docker
of Docker containers obtains many Containers. In Service-Oriented
advantages about portability, Computing” - 13th International
convenience, and scalability. However, Conference, ICSOC 2015, Goa, India,
we need to pay attention to the problem November 16-19, 2015, Proceedings,
sizes, application types and system pages 316–323, Berlin, Heidelberg, 2015.
limitations. Like other powerful Springer Berlin Heidelberg.
technologies, Docker is not without its
downsides, but the net result has been a [7]. ​Charles ​Anderson, “Docker [Software
big positive for this project. engineering]” ​Published in: ​IEEE
Software ( Volume: 32, ​Issue: 3 ,
The consider of more types of May-June 2015 ) Sponsored by: ​IEEE
applications to extend this project will be Computer Society​. (
conducted in the future. https://ieeexplore.ieee.org/document/7093
032​)

[8].​Sachchidanand Singh ​, ​Nirmala Singh​’


VIII. REFERENCES “Containers & Docker: Emerging roles &
future of Cloud technology” in ​2016 2nd
[1]. ​D. Merkel, “Docker: lightweight International Conference on Applied and
Linux containers for consistent Theoretical Computing and
development and deployment,” Linux Communication Technology (iCATccT)​.
Journal, vol. 2014, no. 239, p. 2, 2014. (https://ieeexplore.ieee.org/document/791
2109)
[2]. ​Docker 1.11 adopts Open Container
Project components [9]​.What Is a Container.
http://www.infoworld.com/article/305596 https://www.docker.com/resources/what-c
6/open-source-tools/docker- ontainer
111-adopts-open-container-project-compo
nents.html

You might also like