Welcome back.

In this tape let's look at a youth case where Docker is very very useful.

I would recommend you to follow along and type in the comments as we type them in.

Now let's look at the scenario you're part of dev ops team which is working on an amazing new project.

You're going to build amazing API is in Java Python and JavaScript three different languages.

You are ready with the basic versions of all these applications and you'd want to deploy them quickly to the cure environment.

You also have a new team member who's pairing up with you.

He wants to understand how you would want to deploy applications to cure.

So you would sit at a desk launch up terminal and you are ready to execute a few commands.

So if you're in Mac launch up terminal if you're on Windows launch up command prompt on other operating systems launch of the shell and type in the command Docker high end hyphen version.

So on the QM machine Docker is installed and I see that devotion is greater than 19 so we are all good.

Now you tell him let's deploy the python application first.

So you start executing a simple command Docker run hyphen P 5000 colon 5000 in 28 Min slash hello world bite them colon zero point zero point one third please will understand each of the components of this command very very soon.

Let's focus on the big picture first so you're executing a simple command and your blessing.

And it says I'm not able to find something locally and it's trying to pull something from Docker registry and what you would see is this download would take about 10 seconds to about a minute.

Based on your download speeds based on your internet speed and within a few seconds you see that the application is up and running.

You launch up your browser and go and hit the URL looking host colon five thousand and you see that there is a response coming back our plugin called the chrome viewer plugging in St..

And that's why the Jason appears very very fragmented but the important thing is we were able to quickly deploy an application within a few seconds and we were able to see it running.

Now your new team member who's sitting beside you is stunned.

He has a lot of experience doing operations in an earlier team and he says in my team I used to get a document from my development team describing the hardware the specific version of the operating system the specific version of the software and the specific version of the application to deploy.

I used to manually follow the instructions create a server install an operating system on top of it and install the right software install Tomcat or whatever you'd need to run your application and install

the right language Java or Python.

And after that is when I would download the application and deploy it and very manually setting up the environment.

I used to make a lot of mistakes.

So you tell him with Docker we don't really need any details about the application that we would want to run.

We don't really need to worry about what language the application is built with.

Is it a job application or a python application or a javascript application.

We don't really need to worry about which version of Java or which version of Python.

What were the frameworks which were used to build the application with.

What is the software that is needed to run the application all that the developer needs to do is to create something called image or darker image and you can run the image the same way variable dock at

runtime is installed it does not matter if the image contains a tile application a python application or a no JS application you still run it the same way.

So you go out and tell him let's start running the Java application and let us bring this python application down for a little while so you'd press concurrency and this would actually start termination of the

Python container which was launched up.

And if you go to the browser and refresh you'd see that the application is now down.

You do clear and you'd say let's launch up the Java application.

You'd see that the launch of the job application all that you would need to do is to change python.

So you're changing the image name from Python to Java and I would press and and you'd see that with exactly the same command without changing anything without installing Java or without installing any specific needs any frameworks or any tools that the application needs to run.

You'd be able to quickly launch up the Java application as well.

The application takes a little longer to download because the size of the image is little bigger.

So let's wait for it to complete downloading.

You'll see that the images now downloaded and the application is now being launched.

So wait until you see the message that the application is up and running okay within a few seconds.

I saw that the application is up and running it says it took about 15 seconds to launch this application app so you go to the browser.

No change in the UI rule and you'd press refresh and you'd see that you are getting a response back from the Java application.

So you have tested your python application.

Your job application.

The only application which is left out now is javascript application.

You do a controlled C and now do a clear again.

And in here instead of java you type in node JS No JS is an amazing framework to develop server side applications with JavaScript and this API that we are going to test is built with JavaScript using did

no JS.

So let us press enter like nerve and you'd see that it would again download a specific image.

So the download of the image is in progress right now if this would take a few seconds and now you'd see ready on port five thousand.

Cool and good browser and refresh and you'd see that you get a response back from the javascript application as well.

In this step what we did is we looked at the power of Docker.

I'm sure there are a lot of questions in your mind and during the next 45 minutes we would answer all those questions.

The important thing to remember from this specific step is that once you have a Docker image it does not matter whether it's Docker image of a python application or job application or a no JS application

you can run it the same way using the same instructions with darker and darker.

You don't really need to follow a set of manual instructions or that you need to do is execute a simple command and your applications will be up and running.

I'll see you in the next step.

  • No labels
Write a comment…