1 00:00:00,780 --> 00:00:05,240 Throughout this course we've been making use of images that have been created by other engineers. 2 00:00:05,250 --> 00:00:10,670 So for example we have used say the hello world image or reduced or busy box. 3 00:00:10,680 --> 00:00:14,550 These are all images that were created by other engineers. 4 00:00:14,550 --> 00:00:20,160 We download them onto our local machine and then created a container out of them. 5 00:00:20,160 --> 00:00:24,720 At this point we're going to start to figure out how we can build our own custom images so that we can 6 00:00:24,720 --> 00:00:29,850 run our own applications inside of our own personalized containers. 7 00:00:29,850 --> 00:00:35,250 The process for making an image is somewhat straightforward like all things you just have to learn a 8 00:00:35,250 --> 00:00:37,050 little bit of syntax. 9 00:00:37,050 --> 00:00:40,120 So here's what we're going to do to make our own image. 10 00:00:40,170 --> 00:00:45,960 We're going to create something called a docker file a darker file is essentially a plain text file 11 00:00:46,170 --> 00:00:50,290 that is going to have a couple of lines of configuration placed inside of it. 12 00:00:50,310 --> 00:00:55,920 This configuration is going to define how our container behaves or more specifically what different 13 00:00:55,920 --> 00:01:01,320 programs it's going to contain and what it does when it starts up as a container. 14 00:01:01,320 --> 00:01:06,210 Once we create that Docker file will then pass it off to the docker client which you'll recall is the 15 00:01:06,210 --> 00:01:10,020 docker supply that we've been using at our terminal in turn. 16 00:01:10,020 --> 00:01:13,880 The Docker client will provide the file to the docker server. 17 00:01:13,880 --> 00:01:17,400 The Docker server is what is doing the heavy lifting for us. 18 00:01:17,430 --> 00:01:22,740 It's good to take the docker file look at all the lines of configuration that we have inside of it and 19 00:01:22,740 --> 00:01:28,040 then build a usable image that can then be used to start up a new container. 20 00:01:28,110 --> 00:01:32,700 Now that Docker file is where all the complexity is going to sit and like I just said a moment ago it's 21 00:01:32,700 --> 00:01:34,610 not really going to be the worst thing in the world. 22 00:01:34,620 --> 00:01:40,950 It's just about learning a couple of new commands that's all in fact just about every Docker file that 23 00:01:40,950 --> 00:01:47,120 you and I are going to put together is almost always going to look the same inside of every Docker file. 24 00:01:47,170 --> 00:01:49,760 We're always going to specify a base image. 25 00:01:49,800 --> 00:01:51,820 We'll talk about what that means in just a moment. 26 00:01:51,850 --> 00:01:52,190 It's got it. 27 00:01:52,190 --> 00:01:54,600 It's going to be one of the first things we have to do. 28 00:01:54,790 --> 00:02:00,580 After that we'll add in some additional configuration to run commands to add in some dependencies or 29 00:02:00,580 --> 00:02:06,580 some more software some more programs that we need to successfully create and execute our container. 30 00:02:06,580 --> 00:02:11,050 And then finally we will specify a start up command for the image. 31 00:02:11,050 --> 00:02:15,880 So anytime we take that image and create a container out of it it will be the command that is executed 32 00:02:16,090 --> 00:02:22,510 to essentially boot up or start the container is the same command that we've been talking about around 33 00:02:22,570 --> 00:02:24,250 all of these images all along. 34 00:02:25,070 --> 00:02:25,450 OK. 35 00:02:25,470 --> 00:02:26,110 So that's it. 36 00:02:26,110 --> 00:02:30,910 That's all we have to do to make our own image essentially just revolves around writing a docker file. 37 00:02:30,910 --> 00:02:32,340 So let's take a quick pause right here. 38 00:02:32,350 --> 00:02:35,770 We'll come back the next section and get started working on our Docker file.