1 00:00:00,930 --> 00:00:05,640 In the last section we put together our very first Docker file and then very quickly used it at the 2 00:00:05,640 --> 00:00:07,790 terminal to build a new image. 3 00:00:07,800 --> 00:00:10,790 However we didn't really talk about what was going on inside of here. 4 00:00:10,800 --> 00:00:15,720 So in this section and the next I want to do a deep dive on all the configuration that we added to the 5 00:00:15,720 --> 00:00:20,110 doctor file and also what happened over at the terminal afterwards. 6 00:00:20,130 --> 00:00:20,940 So let's get to it. 7 00:00:22,320 --> 00:00:22,700 All right. 8 00:00:23,040 --> 00:00:27,450 So I took every line out of that Docker file except for the comments and put it into this diagram right 9 00:00:27,450 --> 00:00:28,210 here. 10 00:00:28,260 --> 00:00:34,260 So you see from Alpine run and command you'll notice that every line of configuration we put in there 11 00:00:34,350 --> 00:00:36,840 look kind of similar to the others. 12 00:00:36,900 --> 00:00:41,500 Every line started off with a single word that we refer to as an instruction. 13 00:00:41,580 --> 00:00:47,940 This instruction is telling the docker server to do some very specific preparation step on the image 14 00:00:47,970 --> 00:00:54,660 that we are trying to create the instruction from is used to specify the Docker image that we want to 15 00:00:54,660 --> 00:01:02,220 use as a base the run instruction is used to execute some command while we are preparing our Custom 16 00:01:02,220 --> 00:01:02,870 Image. 17 00:01:03,240 --> 00:01:08,940 And then these M.D. or command instruction specifies what should be executed. 18 00:01:09,010 --> 00:01:09,960 Winner containers. 19 00:01:09,960 --> 00:01:15,300 I mean when our image is used to start up a brand new container every line of configuration that you 20 00:01:15,300 --> 00:01:20,550 are ever going to add to a darker file is always going to start off with an instruction. 21 00:01:20,700 --> 00:01:26,760 Now we just use the three most important instructions to know there are quite another a quite a handful 22 00:01:26,760 --> 00:01:28,390 of other instructions out there. 23 00:01:28,440 --> 00:01:33,750 We're going to look at a handful of them throughout the rest of this course but again from run and CMT 24 00:01:33,810 --> 00:01:38,100 are the most important wants to know and understand after each instruction. 25 00:01:38,130 --> 00:01:43,650 We then provided an argument to the instruction that kind of customized how that instruction was executed. 26 00:01:43,650 --> 00:01:50,700 So as you might guess by putting from Alpine we are saying we want to use a base image of Alpine when 27 00:01:50,970 --> 00:01:55,710 preparing our image and we'll talk more about exactly what that base image is doing for us in just a 28 00:01:55,710 --> 00:01:56,010 moment. 29 00:01:57,340 --> 00:02:01,050 On the next one we said we want to run this command. 30 00:02:01,180 --> 00:02:06,160 This command was the argument that was provided to the instruction and then for CMT done here at the 31 00:02:06,160 --> 00:02:06,510 bottom. 32 00:02:06,520 --> 00:02:07,470 Well I bet you can guess. 33 00:02:07,480 --> 00:02:10,000 Yeah that is the argument to CMT. 34 00:02:10,060 --> 00:02:10,270 All right. 35 00:02:10,270 --> 00:02:15,940 So that's what was going on with the overall structure of the docker file but that doesn't really explain 36 00:02:16,150 --> 00:02:21,340 a lot of the pieces or it can like what the intent of each of these lines were outside of the comments 37 00:02:21,430 --> 00:02:24,250 that we added on there while we were writing the docker file. 38 00:02:24,280 --> 00:02:25,560 So let's take a quick pause. 39 00:02:25,570 --> 00:02:26,960 We're gonna come back the next section. 40 00:02:27,040 --> 00:02:32,320 We're gonna start to look at the output that we got inside of our terminal and try to understand how 41 00:02:32,410 --> 00:02:38,400 each of those lines of configuration was interpreted by the docker server and used to build our image. 42 00:02:38,410 --> 00:02:40,180 So quick break and we'll see you in just a minute.