All right guys I have just explained you how to use the DST option along with container run command.
Now you know difference between this identity and I.D. options and we have actually tried a different
variance with Docker on command.
Now it's time to start the creation of a multiple containers using the same image.
And then this lovechild I'll create the two containers using boom too much.
And I'll demonstrate that those containers are completely two different containers and they are fully
independent.
Accepted that fact that they basically share our sources of Dr Horst.
I mean the simple Euro sources RAM and disk.
Great.
Let's get our hands dirty and let's create first container based on a one to image Docker run.
That idea I use of those two options here or Wyndham because I want to look into that the container
basically into default the brought us gold the best.
Let's press enter and now I'm inside of the container.
That is the thrust container that we have just created.
Let's for example these files here and let's.
For testing purposes.
Create the new folder here gold dust and game design test.
Let's see due to this dust folder and let's create here file Deitch.
That's not the.
And let's go back out of this dust folder and file these files and folders here.
You'll see this dust folder here on the list.
Wonderful.
Let me know.
Create one more container based on the same image.
Want to let me open up a new tab.
Basically let me drag this step here and put those two tabs to side by side.
Like so because I want you to see differences between those two containers again here is the thrust
container with the image and the handle this container we have agreed that the new folder called test
and the inside of that folder there was a file called test takes deep.
And here in this window let me start one more container based on the same image were wounded.
Same command dock Iran Desk idea window container was started and noticed that there was difference
in container I.D. here was actually idea of this container and it is automatically taken as a hostname
of this container.
This computer I actually.
And here is this idea that was used for this container number one.
Great.
Let's now list files and folders inside of this container.
Alas and you'll see same set of folders and files that we have seen here in this container before creation
of the test folder.
And there was no test folder inside of this container.
This shows you that every container has its own separate file system and file systems of different containers
don't overlap.
They are completely independent but of course those file systems are stored on the same dock or host.
In this case dock host is your dollar machine inside of which those containers are run.
And this will dollar machine is basically running on this Mac computer.
Same picture for Windows computer.
Great.
I could also create the sound files and folders inside of this container and let me do that quickly.
For example I could create a folder called test to see need to dust too.
And here let's create the file test.
Do that DST.
Let's list files here.
You'll see test to the disks file instead of test to folder.
And if I let c d out of this folder you'll see it that's the folder are here in the root of this container.
And again if I repeat the same command here in container number one you'll see that there was still
that folder and no test to a folder.
Great that there's a difference between this container and this container.
And now you'll see that the containers are fully independent and they again only share CB your resources
of the docker Horst and ram it means that each of those containers may take up to 100 percent resources
of the docker Horst.
And of course there is the possibility to limit the maximum size of resources that each container may
utilize and we will get back to that later on in this course.
Also you'll see that the doors containers have different host names and actually you could verify hostname
by typing the host named command like so and you'll see a host name of this container.
And actually this last name is shown here after a log in into the container.
And if you would like to check hostname he on this container you could use same command hostname and
you'll see hostname of this container.
We could also verify IP addresses of every container and for that you could use command hostname that
I and hostname this I in this container and you'll see that those containers have different IP addresses
but they're basically from the same network and that is the default the bridge network inside of the
docker host.
Great.
That's the whole door's containers differ.
And the goal of this lecture was to demonstrate that containers are full independent and have a different
file systems.
Let's not proceed in the next lecture.
Let's develop this topic and let's try to create two different engine accelerators that will host different
files from different folders and again that will prove that you are able to create multiple containers
based on the same image.
And one more thing that they wanted to tell you is that in this case you were not prompted to download
any new image something girls image was already in your local cache and it was simply reused for both
containers.
That's why you have created the north containers pretty fast in a matter of seconds.
And of course if I will read the new container want to contain them now it will get the clean file system
without any test or test to folders that we have created in previous containers.
Wonderful.
Let's not cross it and next to let's create the two engine containers with two different set of files.
See you next.
Bye bye.