OK guys.
So we have just agreed to the very first container using hello world image.
We have pulled it from a remote registry called Docker Hub and after Worlds have created container.
And this container has printed some text to the terminal.
Also in this text do you see suggestion to dry Amal's a container with this command dork around dash
a deep wound to bash and with this command to we will be able to create a NAS or container using a wound
to image but let's try it without the option that's a deep and best thrust simply as we have it dry
it the wheels dock around.
Hello world.
Let's no type dork Iran will want to end it and see what will happen.
Let me clear uptime and no control okay.
And here let me type Docker on Iran.
Do you see that we again we are not able to find.
Image aboot latest locally.
And that's why we have started pool operation from a remote registry Docker Hub and you'll see that
we have pulled several times and you see here different ideas now.
A real not explain what it means.
We will get back to it later on when they will explain how Docker rocks under the hood.
For now you should understand that we have simply pulled in which gold to bundle from a remote registry
Docker Hub.
Also you see SHA 256 hash.
Same as we have seen before.
Hello rolled image but of course hash itself is different here from the hash for Hello rolled image.
Also you see finally that the image was the.
Its status is downloaded but afterwards after we have executed basically Doc Iran want to command we
have returned to terminal.
It means that actually nothing happens and we are not able to do something inside or the wound to container.
But it was immediately terminated afterwords.
Why.
Because there was no command that was executed inside of this winter container.
And if there are no processes Iran in inside of the container Docker automatically terminates container
and if I'll enter Docker B.S. now you'll see that there are no containers Iranian.
But I am able to observe history of the containers that where exited.
For that you could use command Docker B S with option dash a like so and now I'll see that there was
a container that was based on a one to image and there was command.
This one that was executed automatically.
Here was this command but we have not performed anything inside of the bash inside of the container.
That's why container has decided that best should exit and it was exited.
Process was terminated and afterwords Docker has eggs that container as well.
This way Here you see that the status of this container is exited about a minute ago.
Also you see information about previous containers that we have created in the previous lecture and
we have used their whole Hello rolled images here and here.
We have created basically two different containers and you see that they were exited about an hour ago.
Okay.
That is the status of this container that we have tried to create using a docker Iran command.
Also if I list now local images with command Docker images I should see here a wound to image on the
list.
That means that you failed Dwyer to create one more container using a 1 2 image.
It will be created using the same image as you see here.
There was no need to pull the same image from Docker Hub.
Let's try that again and let's try it.
That was the same comment as we have used before Docker Iran or window and we see actually nothing but
again under the hood Docker has created new container based on this image.
There was no need again to pull it from Docker Hub because we already have it here on the list but after
the container was again automatically terminated.
Let's have a look at history of containers Docker B.S. and DSP.
Actually there was alternative commendable Docker appears and this command is docker container alas.
And if I'll type here.
Door cargo container unless there's a you'll see actually the same result as with Docker because Dash
8 it brings us history of all containers that were created before.
And again you see here one more container that was created using a boom to image.
And this container was exited.
I mean the goal here below you'll see a second container with the same image a window but this one was
exited four minutes ago.
It means that each time when you execute command dock Iran and some image Docker creates new container
based on specific image.
But now you may ask me a question how we are actually able to look into that container container and
execute some commands inside of that wound the operating system.
Answer is pretty simple.
Let me show you Dr Ron dash idea.
Let's press enter and see what will happen.
And now you'll see that I hold basically anther best shell inside of that window container and I have
locked in automatically as a route user here you see that.
And here is actually a d of this container that was just created and now I am still inside of this container
and container is still run.
Let me show you that.
It is still running.
Let me open up new tab here in time now and let's enter Docker at B S command.
Here you see image that was used this window and all you see here container I.D. And this I.D. is the
same as you see here in this bash shell inside of that one two container.
And now actually we are able to perform some operations inside of this container for example let's use
a last command and list files inside of that one container.
And here you see some set of folders.
And for example you are able to list the files inside of the bin folder.
Let's do that has been and you'll see some set of executable that you are able to use inside of that
will want a container.
Again please notice that this set of files and folders is completely isolated inside of this computer
container.
It is not a set of files on my Mac most computer where I am running Docker right now.
Actually let me assure you that to prove that let me open up one more step and here let me Alice and
you'll see actually at least of a folder on this Mac computer.
And also I am able to list actually files in lesbian folder and you'll see it set of executable it's
on my make us computer and this set of executable is of course different from this set of executable
files.
That's how you're able to list the files inside of the container and again again container is still
around.
You could verify it here.
Docker appears and you see that there was a container with one image that is up and running and it is
up to minutes and also you see here which command was executed being slashed.
Bash does bash shell and we are actually located now in this best shell okay.
Liz note is that the this container runs no full featured one two operating system and you could verify
a of this operating system using cut the slash it is seam slash Oh yes that's release you see here Marshall
womb to age no fraud not for long term support release also we could try something go so let's try for
example X command let me clear terminal and type echo how low from one to container enter and you'll
see a hello from a window container here in this shell please note that we are able to use this command
because there is such executable inside of the bin folder let me list contents of a bin folder once
again and you'll see here on the list let's twice Thompson girls let's call your terminal and type host
name come in and you'll see here cos name of this container it actually matches with this a d here on
the list also we're able to verify which IP address was assigned to this container using command hostname
that I like so and you'll see IP address one hundred seventy two seventeen or two here in this output
great that's how you're able to perform some inside of that one to container let's not type exit and
let's exit from this bash shall exit and we have it back to our time no less.
Now least the containers that are currently running Docker B.S. and you'll see empty output basically
you are able to use alternative command to look up yes docker container alas and you'll see same result
there were no containers currently running but if I'll enter Docker B S dash a you'll see that our winter
container was exited 34 seconds ago why it was exited answer was pretty simple.
We have exited from bash shell inside of the container and that terminate that bash brought us inside
of the container and when there are no processes running inside of the container Docker simply terminates
such a container and that's what actually happened here.
In this example.
Great.
Let's also clear terminal and let's have a look at the size of the image.
That was the loaded 4 1 2 containers Docker images like so.
And here you'll see size equal to 64 megabytes.
There's of course much more large art than science of the hello world container that was simply less
than 2 kilobytes in size but this size is relatively small in comparison to let's say Docker installation
itself.
That was around 2 gigabytes for Mac OS or Windows computer.
But this size is still large in the docker world because we have used here full featured wound to operating
system and in the next example I would like to demonstrate you how you're able to create the Linux container
using the smallest image possible.
Let's try that next.
My.