1 00:00:00,840 --> 00:00:04,890 In the last section we went over the behind the scenes flow of what occurred during that darker build 2 00:00:04,890 --> 00:00:05,820 process. 3 00:00:05,820 --> 00:00:08,790 Now there's a rather long section and we went through a lot of detail. 4 00:00:09,060 --> 00:00:14,310 So in this section I want to do a quick recap just a very quick overview on the really important critical 5 00:00:14,310 --> 00:00:15,510 flow to understand. 6 00:00:15,630 --> 00:00:18,000 Now if you don't want to hear me lecture about this stuff anymore. 7 00:00:18,000 --> 00:00:20,090 If you feel like you already have a good understanding. 8 00:00:20,220 --> 00:00:20,980 No problem. 9 00:00:21,000 --> 00:00:23,550 Positivity right now and move on to the next section. 10 00:00:23,550 --> 00:00:26,730 Again we're only going to do a recap of what we just spoke about a moment ago. 11 00:00:27,300 --> 00:00:27,570 OK. 12 00:00:27,600 --> 00:00:30,600 So here's the recap with a slightly different diagram. 13 00:00:30,600 --> 00:00:36,570 So everything started with the firm Alpine instruction that told the Dockers server or Dr. Damon to 14 00:00:36,570 --> 00:00:42,360 go and download the Alpine image and we use the Alpine image as a base because it comes pre installed 15 00:00:42,390 --> 00:00:46,760 with some really handy programs that are useful for us creating our image. 16 00:00:48,280 --> 00:00:53,560 The next thing that occurred was the run instruction was executed by the docker server. 17 00:00:53,560 --> 00:00:58,200 The first thing that occurred there was it looked for the image from the previous step. 18 00:00:58,390 --> 00:01:04,260 And so it went back to the previous step and got the Alpine image that had just been downloaded that 19 00:01:04,260 --> 00:01:08,730 image was then used to create a brand new very temporary container. 20 00:01:08,730 --> 00:01:12,980 So here's our container over here and then the command that we had specified. 21 00:01:12,990 --> 00:01:19,390 So AP okay add dash Update Read This was executed inside of that temporary container. 22 00:01:19,740 --> 00:01:26,620 The AP program was executed it downloaded and installed red is inside the file system of that container. 23 00:01:26,640 --> 00:01:30,120 So the result is a container with a modified file system. 24 00:01:30,210 --> 00:01:34,160 It now has red is added onto it. 25 00:01:34,170 --> 00:01:37,560 We then took a snapshot of that containers new file system. 26 00:01:37,560 --> 00:01:40,320 And the result was a file system snapshot. 27 00:01:40,350 --> 00:01:45,390 We then shut down the temporary container like this one right here that had just been created and we 28 00:01:45,390 --> 00:01:48,630 got our image ready for the next instruction. 29 00:01:48,660 --> 00:01:52,290 And the image that we're using is that file system snapshot. 30 00:01:52,290 --> 00:01:58,590 The modified one that we just created when we installed reds so you can now imagine that we are now 31 00:01:58,590 --> 00:02:00,250 passing onto the next step. 32 00:02:00,300 --> 00:02:08,290 We are essentially passing along the Alpine image but with red is added on top so we then move on to 33 00:02:08,290 --> 00:02:10,660 the command read a server instruction. 34 00:02:10,660 --> 00:02:12,940 We again get the image from the previous step. 35 00:02:13,000 --> 00:02:15,310 We again create a temporary container out of it. 36 00:02:15,310 --> 00:02:20,830 But this time around rather than executing a command inside there which is the purpose of the run instruction 37 00:02:21,220 --> 00:02:27,370 we instead use the CMT instruction which is used to specify what the container should do or mean what 38 00:02:27,370 --> 00:02:31,650 the image should do when it is started up as a container. 39 00:02:31,800 --> 00:02:36,420 So we told the temporary container that we just created that whenever it gets started in the future 40 00:02:36,480 --> 00:02:40,130 it should try to execute the command this dash server. 41 00:02:40,290 --> 00:02:45,160 And the result was a container that has a modified primary command. 42 00:02:45,180 --> 00:02:50,190 We then shut down that temporary container and we got it ready where you took an image out of it and 43 00:02:50,190 --> 00:02:52,100 got it ready for the next instruction. 44 00:02:52,170 --> 00:02:56,970 But in that case there are no more instructions no more steps to execute inside this file. 45 00:02:57,150 --> 00:03:03,840 And so the output of the overall series of steps is whatever image was generated during the last instruction 46 00:03:03,870 --> 00:03:06,120 inside of our darker file. 47 00:03:06,120 --> 00:03:06,400 All right. 48 00:03:06,510 --> 00:03:12,070 So like I said just a quick recap on that entire process one more time because it is it's not super 49 00:03:12,070 --> 00:03:15,960 critical that you have an in-depth understanding here but it definitely makes a lot of this darker stuff 50 00:03:16,260 --> 00:03:20,910 a lot easier if you have a good grasp on this entire flow. 51 00:03:20,910 --> 00:03:23,820 So let's take a quick pause right here and we'll continue in the next section.