-: Starting this section and the next couple,
we're gonna start to look at
the Docker client or Docker CLI
inside of our terminal a little bit more
and learn about some of the very basic commands
that we used to interact with Docker containers and images.
Now, fair warning here, some of these sections
are gonna be a little bit boring
cause we're essentially just gonna be typing in commands
and looking at the output that comes.
But I'm gonna do my best to make sure
to share a lot of interesting information
with you along the way.
So let's get to it.
The first command that we're gonna look at
is one that we ran very briefly before,
is the command that we're going to use to run, excuse me,
to create and run a container using an image.
So at the command line, we're going to execute docker, run,
and then the name of the image that we want to use
as the basis for this container.
Now, we've already gone through this process once before.
At the command line, we ran Docker, run, Hello Dash world
and then we saw that message appear on the screen.
Now, using the knowledge that you now have
about what a Docker container really is,
I want you to think about what probably just occurred
when we ran that command.
Chances are that somewhere on our hard disc
is an image that has that file system snapshot
with one single program inside of it.
Maybe that thing is called, I don't know, Hello world.
Who knows what it's really called.
So when we executed Docker Run Hello World,
we took that little snapshot of the hard drive.
We stuck it into this little container thing
or this kind of grouping of resources,
and then we executed the command run Hello World.
And so the running process up here was Hello world.
That thing ran and then eventually exited.
So that's what is happening behind the scenes
when you execute that command.
Now there's a lot of variations on this Docker run command
and a lot of very small subtleties around it.
So let's take a quick pause.
We're gonna come back to the next section.
We're gonna start looking at
some of the interesting features around the run command.
So I'll see you in just a minute.