Welcome back.
Now let's shift our attention to getting these containers up and running in our local machines.
If you go to visual studio called Inside the Michael services folders.
We have the code for these and you have respective Docker files.
These are very very similar to the java Docker files that we looked at earlier.
There is a docker file inside the currency exchange macro service and inside the currency conversion micro service as well.
So you'd see that these Docker files are exactly the same thing as the Java hello world application that we built earlier.
What we have already done is we have built the docker images for these two micro services and deployed them to Docker Hub.
So going forward let's make use of the images of the images for these micro services from Docker Hub to get them up and running.
So I'm going back to have that awkward dot com slash youth slash in 28 min and all here.
Do you think that which we are looking for is currency exchange.
So this is the first Microsoft is image that we are looking for and you'll see that we have multiple tags which are present for this.
Let's start with running the zero point zero point one dot release.
So let's take the 0.01 release tag.
So this is the docker pull tag.
So I'll copy this and oh here we can run the command Docker run hyphen P.
What we'll do is for currency exchange we'll always reserve the port eight thousand two currency exchange runs on a thousand.
So we'll expose it from the container port will expose it on whole sport a thousand and let us also give it a name.
Until now we have not given any names to the containers.
Let let's start giving names to the containers as well.
So hyphen hyphen name is equal to currency exchange.
So we are giving a name to the container and stuff randomly generated name.
What we are doing is we are giving the specific name to Docker and hyphen b a thousand kilometres and hyphen have a name musical currency exchange and after that is the image name two in 28 Min.
What we have copied earlier.
I'm just typing it in currency exchange and it's zero point zero point one hyphen released.
This is something you can be careful about.
It's 0.01 to one hyphen release.
So don't make any typos in here.
It's not dot release it's actually hyphen release.
And now I'll be able to run this up so you can see that it's unable to find the image locally.
So what it's doing is it going to be Docker Hub and trying to pull the major so that they may just pull.
And now it's trying to run that image.
Let's see what would happen.
This is a Dallas Springboard application.
So it would launch up.
It would take about 10 seconds I think to launch the whole thing up and it would be running on which port.
Yep.
Port eight thousand okay.
It took about 32 seconds to launch the application up.
I would want you around.
We already documented the URL in the micro services.
Read me file so that it be filed.
If you go in here and pick up the you item and you run it.
Fingers crossed.
Yeah.
It's working fine as I said earlier.
I have a chrome.
Jason you were plugin installed and that's the reason why the Jason appears formatted.
But you can see that you are at the convention multiple is seventy.
I did a can Tulsi to terminate the container.
Let's launch it up in a detached mode.
So let's go to the start and let's actually use a hyphen D to launch it up in a detached mode when you're launching up in the detached mode.
You should see an error.
The thing is you cannot launch up to containers with a same name.
So before launching up a new container for currency exchange with the name as currency exchange you need to remove the existing container.
So docker container remove currency hyphen exchange.
And now I'd be able to run it in a detached mode and I would also want to be able to run the currency conversion service.
Let's do a clear and let us go back and try and run the currency conversion service so the image for it is currency conversion.
And the name I would give it for it is currency conversion as well.
And the port I would want to use for currency conversion service at eight thousand one hundred and eight thousand one hundred.
You can also go or here so instead of currency exchange you can type in currency conversion and you'd be able to see the exact tags which are present for that specific thing.
So you'd see that 3.0 point zero only the one which we are really interested in is zero point zero point one hyphen release so this is the one which we are trying to run right now.
Let's run this.
It says the currency conversion image is not available locally.
So it's trying to pull it.
It should take a little while before the image is pulled down.
The images now downloaded and the container is kicked off.
Now let do a tale of the logs Docker logs iPhone F and keep the right.
As you can see this is still starting up so let's wait for the container to start up.
Let's go ahead and grab the you are ready for it.
So with the currency conversion service to release this and let's face it down here.
UPS error is saying I'm unable to get the response back from should it be local host a thousand currency exchange Slash.
You are too I am not.
If you take this and executed in here.
This is working fine.
However when the currency conversion service container is trying to call the currency exchange service from inside the container it is unable to talk to it.
How do we fix it.
Let us start with looking at that in the next step.
Add Comment