In the last section we put together our very first Docker file and then very quickly used it at the
terminal to build a new image.
However we didn't really talk about what was going on inside of here.
So in this section and the next I want to do a deep dive on all the configuration that we added to the
doctor file and also what happened over at the terminal afterwards.
So let's get to it.
All right.
So I took every line out of that Docker file except for the comments and put it into this diagram right
here.
So you see from Alpine run and command you'll notice that every line of configuration we put in there
look kind of similar to the others.
Every line started off with a single word that we refer to as an instruction.
This instruction is telling the docker server to do some very specific preparation step on the image
that we are trying to create the instruction from is used to specify the Docker image that we want to
use as a base the run instruction is used to execute some command while we are preparing our Custom
Image.
And then these M.D. or command instruction specifies what should be executed.
Winner containers.
I mean when our image is used to start up a brand new container every line of configuration that you
are ever going to add to a darker file is always going to start off with an instruction.
Now we just use the three most important instructions to know there are quite another a quite a handful
of other instructions out there.
We're going to look at a handful of them throughout the rest of this course but again from run and CMT
are the most important wants to know and understand after each instruction.
We then provided an argument to the instruction that kind of customized how that instruction was executed.
So as you might guess by putting from Alpine we are saying we want to use a base image of Alpine when
preparing our image and we'll talk more about exactly what that base image is doing for us in just a
moment.
On the next one we said we want to run this command.
This command was the argument that was provided to the instruction and then for CMT done here at the
bottom.
Well I bet you can guess.
Yeah that is the argument to CMT.
All right.
So that's what was going on with the overall structure of the docker file but that doesn't really explain
a lot of the pieces or it can like what the intent of each of these lines were outside of the comments
that we added on there while we were writing the docker file.
So let's take a quick pause.
We're gonna come back the next section.
We're gonna start to look at the output that we got inside of our terminal and try to understand how
each of those lines of configuration was interpreted by the docker server and used to build our image.
So quick break and we'll see you in just a minute.