1 00:00:01,220 --> 00:00:05,070 In the last video we discussed a couple of the issues that we're probably going to run to once we tried 2 00:00:05,070 --> 00:00:06,660 to deploy our application. 3 00:00:06,660 --> 00:00:09,510 So in this video we're going to discuss something called Docker. 4 00:00:09,510 --> 00:00:13,620 We're gonna talk about how Docker is going to make our lives a lot easier particularly as we start to 5 00:00:13,620 --> 00:00:15,980 go towards production with our application. 6 00:00:16,050 --> 00:00:17,850 So let's talk are all about. 7 00:00:17,850 --> 00:00:23,520 Well with Docker we're going to create a series of things called containers a container is like an isolated 8 00:00:23,520 --> 00:00:24,860 computing environment. 9 00:00:24,960 --> 00:00:29,300 It contains everything that is required to run one single program. 10 00:00:29,340 --> 00:00:34,820 We're going to end up creating separate docker containers to run each of our individual services. 11 00:00:34,920 --> 00:00:40,050 So we'll create one container to run the event plus one for posts one for comments and so on. 12 00:00:40,200 --> 00:00:45,960 If we ever need multiple copies of some service say if we need multiple copies of comments then we will 13 00:00:45,960 --> 00:00:51,890 start up a second docker container so we can really imagine that there's going to be a one to one pairing 14 00:00:52,070 --> 00:00:58,170 between docker containers and each instance of our running program let's discuss why we are going to 15 00:00:58,170 --> 00:01:01,480 use Docker at all and what problems it really solves. 16 00:01:01,500 --> 00:01:07,290 So at present running our application makes some really big assumptions about the environment that we 17 00:01:07,290 --> 00:01:08,850 are really running on. 18 00:01:08,850 --> 00:01:10,430 Let me tell you what I mean by that. 19 00:01:10,620 --> 00:01:12,380 How do we start up our application right now. 20 00:01:12,390 --> 00:01:16,890 We run that command NPM start right to run NPM by itself. 21 00:01:16,890 --> 00:01:21,510 We are assuming that Puma is installed on our local machine. 22 00:01:21,510 --> 00:01:26,230 We are also making the assumption that node is installed on our local machine as well. 23 00:01:26,310 --> 00:01:31,260 So just to run our program we are making those really big assumptions we're seeing NPM and Node are 24 00:01:31,260 --> 00:01:38,730 both installed on our local machine one other thing to be aware of is that even running our application 25 00:01:39,000 --> 00:01:42,560 requires some very precise knowledge about exactly how to start it up. 26 00:01:42,600 --> 00:01:48,790 So we have to run the exact command NPM start in order to make each of these different services startup 27 00:01:48,840 --> 00:01:49,970 and run. 28 00:01:49,970 --> 00:01:56,780 So in total not only is starting up our application potentially confusing and kind of mysterious but 29 00:01:56,780 --> 00:02:01,490 we also have these kind of implicit requirements about the environment that we're running our program 30 00:02:01,520 --> 00:02:08,700 on the whole goal of Docker is to remove both those issues by creating containers we're going to wrap 31 00:02:08,700 --> 00:02:11,620 up all the dependencies that a program requires. 32 00:02:11,640 --> 00:02:16,770 So that means we're going to wrap up NPM and Node into this little isolated computing environment. 33 00:02:16,770 --> 00:02:21,210 We're also going to include in that container some information about how to start up and run our program 34 00:02:21,270 --> 00:02:22,650 as well. 35 00:02:22,650 --> 00:02:27,000 So all you really need to understand about Docker at this point is that it makes it really easy to run 36 00:02:27,120 --> 00:02:33,910 any arbitrary program you can possibly imagine not just no JSF programs but any other language. 37 00:02:33,930 --> 00:02:39,240 Anything else you can just about possibly imagine starts to get really easy to run when you are using 38 00:02:39,300 --> 00:02:40,810 Docker now. 39 00:02:40,860 --> 00:02:42,210 Why is that relevant. 40 00:02:42,210 --> 00:02:44,400 Well let's take a quick pause right here once again. 41 00:02:44,400 --> 00:02:47,780 We're gonna come back the next video and start to discuss this thing called Coober nettles. 42 00:02:47,780 --> 00:02:52,770 You're going to see how this Docker thing and this idea of making it really easy to run a program works 43 00:02:52,830 --> 00:02:54,420 really well with Cuban eddies.