All right.
I have just rearranged those two windows and stacked on top of each other in order to be able to leave
my face here in this corner.
So let's proceed.
And in this lecture let's read the two different containers based on engine Nix image.
And for that we will Sara files from different folders.
Let's get right into it.
Let's go to visual studio called and look that there was the folder on desktop and inside of it.
There was engine X folder.
And we have used this folder in order to set off some static files like index that this general and
their faith icons to clients that used engine X web Sara.
And now it's a good time to take this folder and make two copies of this folder.
And they called them engine X1 and engine x2.
And afterwards we will spin up to a different container as the running engine etc. and we will expose
them to do different external boards on this computer.
Let's do so.
If you don't have this engine X folder you could take it from GitHub repository just clone it to find
containers for that there and then find in Gen X folder.
Great.
Let me copied this folder.
All right Miles click.
Copy and paste here like so.
And let me or name it.
Press enter and it will be engine X one like so and let's make one more quote Bill based and let's name
it.
Engine x.
Like so next door let's open up engine x 1 for the end open in this similar file down please for us
to close this index said the decimal file that was opened in and Gen X folder.
Okay so engine X1 and in the this gem L and TALF adjusted this text.
Hello from the first and Gen X cetera.
Like so let's save this file next to collapse and Gen X 1 folder expand in Gen X 2 folder and open in
this GMO file there.
And let's just text here.
Hello from the 2nd and Jane etc. And also we could adjust the titles here and instead of a document
here we'll be in let's say NGO x 2 and let's save this file gold 2 engine x 1 folder and index location
all file instead of that folder and adjust document here and here we'll be engine X one let's say save
the file and now we are all set and now we're able to start two different containers in two different
folders.
Great.
Let me close the doors to index AGM all files and gold all time and all record that we have started
the stand alone and Jennings container using the B WD variable and now we will do the same but if you
want to use variable instead of absolute Beth you need to first Cydia to a corresponding folder that
has needed files and only then run Docker on command inside of that folder let's do so here we'll be
in Jane except one server and here we'll be in Gen X 2 Sara let's see did 2 desktop containers in Jane
X one like so and here let's see two desktop containers in Gen X two great let's not start the engine
X one contender and for that we will use as usually dock our on command next let's expose support DSP
and let's run engine x 1 etc. on board let's say 5 5 5 5 and internal port will be 8 and next that comes
well you might be in the stream here we'll be a variable BMW Dean.
Next comes Colin and after Colin you need to specify path to files inside of that container and the
this path is yours user Sharon and Jane Nicks HMO like so.
And finally comes the name of.
And Jane Nicks image and Jane Nicks also optionally youcan specify name of the container recap that
if you don't because if I name of the container and then Docker will generate a random name and you
have seen that such random names before but you are able to add custom name if you want to and for that
you could use option does that name and here let's name this container N.J. and this one like so great
let's press enter and see what will happen.
Container was running we're actually inside of it and we are ready to see some looks great let's now
do the same here for engine next 2 etc. Docker run this beep let's expose it to port 6 6 6 6 like so
and internal port we'll be again aided because the support that is opened by engine X cetera inside
of the container by default next comes the volume might be the same variable BW deem it is important.
Same variable and it will be replaced by absolute path for each of those folders in Gen X to end in
Gen X 1 in our cases and here let's after Colin specify the same internal folder use our Cheryl and
Jane Nicks age demo and let's give name to this container and Gen X 2 and Gen X Okay let's press enter
and start this second and Gen X etcetera.
Now we are all set and those two containers are no running and in order to verify that you will simply
open up a Google Chrome and try to connect the doors to both 5 5 5 5 and 6 6 6 6 let us know so let's
go to Google Chrome and here we could use a local host Buttercup that you're also able to use all back
IP address 127 to 0 0 1 or any of the IP addresses of your computer.
I'll use a local host so local host and here let's connect to frost and Jane etc. hello from dethroned
and Jane etc. Let's open up new tab the local host column 6 6 6 6 say it cannot be reached.
Something is wrong.
Let's go to Diamond now and verify what's actually happening here.
Users share sharing Nix no looks here and the commander to walking properly.
Let's go back to Chrome.
Yeah.
Actually I see here error error or unsafe port.
It seems that I'm not able to expose the sites 4 to 6 6 6 6.
Okay let's rerun this container and the use and USB port.
Let's close this and let's run it at the port let's say 7 7 7 7 and I see error from Doctor error response
from Damon conflict.
The container name and Jane x2 is already in use by another container but actually I have just stopped
this container with custom name but it still exists and you are able to start it over again.
You could verify that by entering Docker appears and you should see only one container running.
And yes that is a case.
Here we send this container that is running here in this window.
But if you'll die a doctor be a sub that's a you'll see that this container should be somewhere at the
top was exhausted but it is still available for use and you are able to restart it if you want to here
with actually this container was named in Jan 2.
That's why we need to remove this contained our heroes before starting container was the same name and
I could remove container by type in Docker R M and here we'll be eyes our I.D. of the container or its
name we could use your name and Jane X to like so container was removed and now I am able to try to
start a container with the same name again.
Let's clear terminal here.
And again goes back to history and I find this comment and let's try to start this container and expose
port 7 7 7 7.
Enter.
Let's go to Rome and here instead of this port let's use this port and to and I see a response hello
from the second engine etc..
Basically I have no idea why.
Port 6 6 6 6 is considered unsafe.
Actually let me google it quickly.
6 6 6 6.
UN safe port and let's check out this first link which ports are considered unsafe.
Vikram Let's scroll down a bit and here is a list of all ports that are considered as are restricted.
Actually you see here a list of default ports for different applications like ports 22 for SSA age and
so on.
And let me scroll down and yes here is a list of ports in this range and this port all six is an alternate
to IRS sea application port.
Actually I don't know what is I.R.S..
Let me check.
What does that.
Quigley see is Internet Relay Chat is a system that facilitates transfer of messages in the form of
text.
Okay.
To some sort of chat and application.
Great.
That's how we found out that we are not able to expose the same support and use it for our gen Gen-X
cetera or any of or container basically.
Great.
We have a dude.
Actually our goal and we are able to summarize what we have achieved in this location and we have agreed
that the two different engine accelerators here was there.
Sarah and we have set up content from the engine X one folder and here was the second engine.
Sarah and Sarah was content from the engine to fall drunk.
And here we have actually verified that.
Here you see Hello from the second engine etc..
And here is the document title engine x2.
And he and this Deb used to document title engine X1 and hello from the first engine etc. And of course
any time when you'll edit the files and those to follow the rules and refresh page afterwards and Google
Chrome you'll see updated page.
For example if I change in the HMO file here in engine X to folder and add one more exclamation mark
here go to Google Chrome back go to engine x2 refresh page you'll see updated the text here.
That's how you're able to start the multiple engine accelerators but it is important that you need to
use different external boards and because on your computer each board may be utilized only by one application.
And in this case those two boards this port and the this port will be actually forwarded to dock Horst
and it will actually proxy indoor sports correspondent containers.
That's how it works under the hood.
Great.
That's all for this logo.
I hope that you enjoyed it.
And we have found some interesting stuff and the nice low let's start with Python and let's create simple
python application and run it inside of the container.
I'll see you in the next lecture.
My.