In the last section we went over the behind the scenes flow of what occurred during that darker build
process.
Now there's a rather long section and we went through a lot of detail.
So in this section I want to do a quick recap just a very quick overview on the really important critical
flow to understand.
Now if you don't want to hear me lecture about this stuff anymore.
If you feel like you already have a good understanding.
No problem.
Positivity right now and move on to the next section.
Again we're only going to do a recap of what we just spoke about a moment ago.
OK.
So here's the recap with a slightly different diagram.
So everything started with the firm Alpine instruction that told the Dockers server or Dr. Damon to
go and download the Alpine image and we use the Alpine image as a base because it comes pre installed
with some really handy programs that are useful for us creating our image.
The next thing that occurred was the run instruction was executed by the docker server.
The first thing that occurred there was it looked for the image from the previous step.
And so it went back to the previous step and got the Alpine image that had just been downloaded that
image was then used to create a brand new very temporary container.
So here's our container over here and then the command that we had specified.
So AP okay add dash Update Read This was executed inside of that temporary container.
The AP program was executed it downloaded and installed red is inside the file system of that container.
So the result is a container with a modified file system.
It now has red is added onto it.
We then took a snapshot of that containers new file system.
And the result was a file system snapshot.
We then shut down the temporary container like this one right here that had just been created and we
got our image ready for the next instruction.
And the image that we're using is that file system snapshot.
The modified one that we just created when we installed reds so you can now imagine that we are now
passing onto the next step.
We are essentially passing along the Alpine image but with red is added on top so we then move on to
the command read a server instruction.
We again get the image from the previous step.
We again create a temporary container out of it.
But this time around rather than executing a command inside there which is the purpose of the run instruction
we instead use the CMT instruction which is used to specify what the container should do or mean what
the image should do when it is started up as a container.
So we told the temporary container that we just created that whenever it gets started in the future
it should try to execute the command this dash server.
And the result was a container that has a modified primary command.
We then shut down that temporary container and we got it ready where you took an image out of it and
got it ready for the next instruction.
But in that case there are no more instructions no more steps to execute inside this file.
And so the output of the overall series of steps is whatever image was generated during the last instruction
inside of our darker file.
All right.
So like I said just a quick recap on that entire process one more time because it is it's not super
critical that you have an in-depth understanding here but it definitely makes a lot of this darker stuff
a lot easier if you have a good grasp on this entire flow.
So let's take a quick pause right here and we'll continue in the next section.