1 00:00:01,020 --> 00:00:06,210 In the last section we broke down the contents of our Docker file and got an understanding of the overall 2 00:00:06,210 --> 00:00:08,200 contents or structure of it. 3 00:00:08,220 --> 00:00:13,220 We now know that there's a handful of instructions that we can use to customize how our image is built. 4 00:00:13,230 --> 00:00:17,370 These are three of the most important instructions to know and we'll introduce a handful of other ones 5 00:00:17,400 --> 00:00:18,600 over time. 6 00:00:18,600 --> 00:00:23,370 In this section I now want to kind of break down what was really occurring behind the scenes with each 7 00:00:23,370 --> 00:00:24,600 of these instructions. 8 00:00:24,600 --> 00:00:27,950 We're going to first begin by taking a look at a little analogy. 9 00:00:27,990 --> 00:00:33,060 So this is going to be an analogy to help you understand the structure or purpose of those lines of 10 00:00:33,060 --> 00:00:40,680 configuration inside that darker file so quick analogy I can tell you writing a doctor file is a little 11 00:00:40,680 --> 00:00:43,780 bit just like being given a computer. 12 00:00:43,860 --> 00:00:50,780 So a brand new computer with no operating system on it and being told to install google chrome on there. 13 00:00:50,790 --> 00:00:56,430 So I want you to imagine what you would do if I handed you a computer that has no operating system on 14 00:00:56,430 --> 00:00:56,770 it. 15 00:00:56,820 --> 00:01:01,980 And I told you you have to install google chrome on here but here is probably what you would end up 16 00:01:01,980 --> 00:01:03,420 doing. 17 00:01:03,540 --> 00:01:07,980 The first thing you might do is try turning on that laptop or turning on that desktop. 18 00:01:07,980 --> 00:01:12,690 And when you turned it on you would probably maybe see some boot up process but then you would eventually 19 00:01:12,690 --> 00:01:18,600 be given a message that says something like hey sorry no beautiful drive or no operating system. 20 00:01:18,720 --> 00:01:20,130 I'm just an empty computer. 21 00:01:20,130 --> 00:01:21,530 I don't know what to do. 22 00:01:21,570 --> 00:01:26,850 So the first thing you would probably do is install an operating system you need an operating system 23 00:01:26,910 --> 00:01:31,250 on that computer in order to go through all these sequential steps on here. 24 00:01:31,470 --> 00:01:35,640 If you want to download Google Chrome you have to go and download it from somewhere by opening up your 25 00:01:35,640 --> 00:01:39,480 Web browser and you have to navigate to Chrome Doug Google dot com. 26 00:01:39,570 --> 00:01:45,150 You have to download the installer and open a file explorer and then execute that installer. 27 00:01:45,150 --> 00:01:51,270 So those series of steps right there those are all steps that are facilitated by the installation of 28 00:01:51,270 --> 00:01:53,040 that initial operating system. 29 00:01:53,100 --> 00:01:57,990 If you didn't have an operating system there would be no default browser to start up. 30 00:01:58,140 --> 00:02:04,080 You would not have a file or folder explorer to startup and you probably would not have any way to run 31 00:02:04,080 --> 00:02:05,770 an executable file. 32 00:02:05,820 --> 00:02:13,270 All of these steps are kind of preceded or dependent upon having an initial operating system so then 33 00:02:13,270 --> 00:02:18,010 going through all those initial steps eventually you would be able to execute the chrome executable 34 00:02:18,010 --> 00:02:19,990 and start up that browser. 35 00:02:19,990 --> 00:02:27,220 So these steps right here very similar to what we just did inside that darker file when we specified 36 00:02:27,220 --> 00:02:29,040 that base image of Alpine. 37 00:02:29,050 --> 00:02:35,020 That was a lot like installing an initial operating system by default when we create a container or 38 00:02:35,050 --> 00:02:36,370 me when we create an image. 39 00:02:36,400 --> 00:02:38,370 We have an empty image. 40 00:02:38,370 --> 00:02:40,120 There's really nothing inside there. 41 00:02:40,150 --> 00:02:45,810 No infrastructure no programs that we can use to navigate around a file or folder system. 42 00:02:45,850 --> 00:02:49,750 There's nothing we can use to download or install or configure dependencies. 43 00:02:49,780 --> 00:02:50,920 There's nothing in there. 44 00:02:51,310 --> 00:02:57,100 So the purpose of a specifying a base image is to kind of give us an initial starting point or an initial 45 00:02:57,100 --> 00:03:01,180 set of programs that we can use to further customize our image. 46 00:03:01,720 --> 00:03:06,460 So that is the purpose of that first line from Alpine. 47 00:03:06,490 --> 00:03:12,790 We said that we wanted to use the Alpine Docker image as kind of an initial operating system or a starting 48 00:03:12,790 --> 00:03:15,650 point for the image that we are creating. 49 00:03:15,790 --> 00:03:20,080 Now your very initial follow up question might be well why did we use Alpine. 50 00:03:20,080 --> 00:03:21,350 What is Alpine. 51 00:03:21,350 --> 00:03:22,870 So that's a good question. 52 00:03:22,870 --> 00:03:27,310 Another brief aside why did we use Alpine as a base image. 53 00:03:27,310 --> 00:03:28,240 Well back to you. 54 00:03:28,240 --> 00:03:34,780 I'm going to kind of pose a question I'm going to say to you why do you use Windows or Mac OS or Ubuntu 55 00:03:34,780 --> 00:03:37,990 or some other Linux distribution on your personal computer. 56 00:03:37,990 --> 00:03:44,530 The answer is that you use any particular operating system because it kind of suits your needs. 57 00:03:44,530 --> 00:03:50,530 Windows might have a program that you need to use your computer effectively you might use Mac OS because 58 00:03:50,530 --> 00:03:53,610 it has a built in terminal and that's really nice for you. 59 00:03:53,650 --> 00:03:59,380 In other words you use one of these default operating systems because it has a set of prenatal programs 60 00:03:59,380 --> 00:04:03,530 that is useful to you and what you are trying to accomplish. 61 00:04:03,550 --> 00:04:09,820 So we just made use of Alpine as a base image as kind of like an operating system of sorts because it 62 00:04:09,820 --> 00:04:15,880 includes a default set of programs that are very useful for what you and I are trying to accomplish. 63 00:04:16,000 --> 00:04:21,670 We are trying to install and run reds and the Alpine based image has a set of programs inside of it 64 00:04:21,880 --> 00:04:28,390 that are very useful for installing and running red is the command that was or the program that was 65 00:04:28,390 --> 00:04:34,000 most useful for you and I for installing and running gratis was found on the second line of the docker 66 00:04:34,000 --> 00:04:34,630 file. 67 00:04:34,690 --> 00:04:38,210 We had said run a P.K. ad update read this. 68 00:04:38,290 --> 00:04:40,450 This is not a docker command right here. 69 00:04:40,450 --> 00:04:44,450 This line has nothing to do with Docker whatsoever. 70 00:04:44,470 --> 00:04:52,690 AP K is a program called Apache package something I think it is a package manager that comes pre installed 71 00:04:52,930 --> 00:04:59,650 on the Alpine image and we can use that package manager that is built into alpine to automatically download 72 00:04:59,680 --> 00:05:01,440 and install it read it for us. 73 00:05:01,510 --> 00:05:07,570 So we made use of Alpine because it had this package manager program automatically included inside of 74 00:05:07,570 --> 00:05:07,830 it. 75 00:05:07,930 --> 00:05:12,960 And so it made it a very convenient thing to start with inside of our Docker file. 76 00:05:12,970 --> 00:05:13,260 All right. 77 00:05:13,690 --> 00:05:18,460 So I think we got a better idea of what's going on with this Frontline and I think we've got kind of 78 00:05:18,460 --> 00:05:21,720 a reasonable idea of at least the right hand side of this one. 79 00:05:21,760 --> 00:05:26,770 You know the actual like Commander line of code that was executed but we still need to have a better 80 00:05:26,770 --> 00:05:31,930 understanding of what run over here is doing have a better understand standing of what command is doing 81 00:05:32,140 --> 00:05:34,830 and kind of put this entire equation together. 82 00:05:34,870 --> 00:05:38,880 So quick break and come back an section and do a little bit more of a deep dive. 83 00:05:38,950 --> 00:05:40,140 So I'll see you in just a minute.