Docker Container !

Spread the love

Spread the loveNow a days, everybody is talking about containers but what that actually means ? what is a container

Spread the love

Now a days, everybody is talking about containers but what that actually means ? what is a container actually are ? these are the questions quite frequently coming into our mind. This post will discuss on the same topic and try to cover the basic idea behind this technology.

Let’s start from the previous architectures, in simple words, a software developer will develop the code for example a java based application, in that application development process developer declare and use various namespaces/packages in their java code files for example java.io for file input and output stream ( Reading and Writing ) from/to a file.

These namespaces actually are previously written code , provided by JDK to reduce the development time & efforts, so that developers need not to write repeatable code again and again they will simple call the namespace and use the methods or classes in that namespace. JRE ( Java Run-time Environment ) will provide actual implementation of those namespaces to the applications or java code at Runtime to successfully parse and execute that application code.

We need Java Runtime environment to deploy our application, in case of of java based application, JRE will be the provided by JVM Java Virtual Machines.
Here we understand that, we need jvm to run our java application as it provide runtime to our applications, it’s a mandatory thing for our applications.

With Traditional Approach:

These JVM has been provided by Java based application servers like : Jboss , Tomcat, WebSphere and Weblogic etc.

In Current Approach :

Let’s Assume we need to deploy same java application which we deployed in traditional approach on Weblogic, This time we need to deploy that application in container.

In this approach, first of all , we need to write a docker file ( set of instructions / commands ) in a text file, explaining our future containers layers, means what all we required inside our container which we are about to create, in other words docker file is the instructions which explains inside architecture of the container.

Content of that docker file generally start by a “From” command,

From BaseImage ( RHEL / CENTOS) etc : This means what will be the base image of your containers operating system when it will be running.

Then you will specify what all software will be required in that container and over that base OS which we layered via “from” statement in our docker file, for example to host a java application in a container we will required a java application server ( tomcat / jboss ), like we used them in traditional approach.

Now you may be thinking, we used same application server to host our applications in traditional approach, and we are using same application server in containerized approach so what’s the difference ?

Note: Previously, you are using VM or Physical servers to install full featured Operating system like RHEL, then we install java jdk and application server on that OS, then use to deploy our application over it.

Next we need to provide the path of our application code which will be deployed into that application server ( .jar, .war, etc.)

Note : In containers we will not use the same software we were using earlier, most of the major companies are providing their container friendly products like ( Jboss specifically tuned for containers ).

When we have our docker file ready, we will initiate it and create an object or snapshot via build commands, incase of docker it would be docker build.

Still we don’t have container, Instead we have container image, here again we required a runtime which will run our container image and create an actual container ( linux process ) from that image.
for this we will use docker, docker is actually providing runtime to host our containers on it.

There are different type of container images available in the market which required different runtimes to host those containers, docker is the most command container runtime available in the market but it’s not the only one, if a different format image we received then we do required a different container runtime which support that type of image.

Few things about command characteristics of a container

Containers are light weighted linux processes
Containers are actually isolated chunk of same host kernel.
Containers are ephemeral in nature and tend to die.
Containers need a guest OS (which runs inside them)
Containers are interoperable in nature they don’t have any external dependency and can be run at any platform with same results.
The main reason behind this approach is less resource consumption, no sense of huge sized containers, they should be light weighted.

9 thoughts on “Docker Container !

  1. Thanks for this, it has given me really good clarity on the traditional approach vs the present approach. Cheers!

  2. Do you have any tips for creating write-ups?
    That’s where I always struggle as well as I simply wind up looking vacant display for
    very long time.

  3. Have you ever before had issues with your webhost?
    I’m open for recommendations as my webhost is dreadful currently.

  4. Do you have any kind of tips for composing write-ups?

    That’s where I constantly battle as well as I simply finish up gazing vacant display
    for long period of time.

  5. Hey there! This is kind of off topic but I need some help from an established blog. Is it hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about creating my own but I’m not sure where to start. Do you have any ideas or suggestions? Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *

Archives

Share !

Social menu is not set. You need to create menu and assign it to Social Menu on Menu Settings.