1 00:00:07,740 --> 00:00:13,450 Now we're going to set up shop using Dukkha, and there are actually many ways to set up shop. 2 00:00:13,520 --> 00:00:20,610 But setting up a docker container, where do you shop is running is the recommended approach because 3 00:00:21,120 --> 00:00:25,790 your server will include all the dependencies, all of the files it needs to run. 4 00:00:26,250 --> 00:00:28,930 And you can also learn how Docker works in the process. 5 00:00:29,070 --> 00:00:30,170 So it's a double win. 6 00:00:30,450 --> 00:00:33,400 So the first thing you need to do is log into the juice shop. 7 00:00:34,260 --> 00:00:39,330 These are Naji's and we'll put in the password next week. 8 00:00:39,720 --> 00:00:40,860 And of course, we're just going to update. 9 00:00:44,690 --> 00:00:51,750 So my host computer, I have Docker up in the browser and the easiest way to install it is to go to 10 00:00:51,750 --> 00:00:52,900 get that docker dot com. 11 00:00:54,330 --> 00:00:56,790 And this is a bad script for Linux. 12 00:00:57,240 --> 00:01:03,690 You know, you need to do is run this command and then is a little play on this command to make it work. 13 00:01:03,690 --> 00:01:04,770 But I'll show you how to get it to work. 14 00:01:05,310 --> 00:01:06,660 So it's very, very straightforward. 15 00:01:06,990 --> 00:01:10,240 And let me show you how to do that now. 16 00:01:10,530 --> 00:01:12,180 So what we're going to do is we're going to run. 17 00:01:12,840 --> 00:01:19,680 Well, first, let's go ahead and install the OpenOffice.org server, because I want to be able to access 18 00:01:19,890 --> 00:01:23,640 to this box from PC. 19 00:01:25,200 --> 00:01:27,120 So it looks like it is already listening. 20 00:01:27,990 --> 00:01:32,460 If it's not listening on your computer, what you can do is you can say you don't have to install on 21 00:01:32,770 --> 00:01:33,810 a stage server. 22 00:01:33,820 --> 00:01:39,570 Taqua OK, and then you would just do a pseudo system. 23 00:01:39,690 --> 00:01:52,440 CTL sagd start always confuse that start SAHD and then you can do status as HD and you can see it's 24 00:01:52,440 --> 00:01:52,770 active. 25 00:01:52,770 --> 00:01:53,010 Right. 26 00:01:53,730 --> 00:02:01,290 So what we should be able to do, you look at the IP address, we can see 10 100 091 we flip over to 27 00:02:01,290 --> 00:02:05,610 our PC, we should be able to tuned into that box. 28 00:02:08,070 --> 00:02:09,030 As Jews, 29 00:02:13,950 --> 00:02:14,340 all right. 30 00:02:17,870 --> 00:02:19,550 OK, so this is good. 31 00:02:20,010 --> 00:02:25,310 So now what we're going to do is we're going to curl get that, Dr. Lacka. 32 00:02:29,580 --> 00:02:34,440 The tackle makes it forward, the it follow the redirect request. 33 00:02:35,160 --> 00:02:36,190 All right, let's grow up. 34 00:02:36,720 --> 00:02:44,550 So here we're seeing it was moved permanently or Puttock L to tell it to follow the three to one move 35 00:02:45,210 --> 00:02:45,810 request. 36 00:02:46,860 --> 00:02:47,430 So we're going to do this. 37 00:02:47,430 --> 00:02:48,330 We're going to grab this. 38 00:02:52,950 --> 00:02:56,400 All right, so now we've got the file, make it executable 39 00:03:00,750 --> 00:03:01,650 and then we can run it 40 00:03:04,560 --> 00:03:06,130 and we'll come back once this finishes. 41 00:03:06,660 --> 00:03:11,190 All right, so now we're going to start the service and enable it to auto start on Bhoot with one command. 42 00:03:17,940 --> 00:03:24,840 All right, and we are currently the user juice, so we want to use user mod to add the user in the 43 00:03:24,840 --> 00:03:27,930 dollar user variable to the Docker group. 44 00:03:28,560 --> 00:03:31,890 I can say user mod add this group. 45 00:03:34,690 --> 00:03:37,130 We want this user to go in there, OK? 46 00:03:37,650 --> 00:03:40,460 And what we want to do is we want to change our current session to that group. 47 00:03:40,470 --> 00:03:45,110 We basically want to log our session into the group called Docker is the one we just added our Dukkha 48 00:03:45,120 --> 00:03:45,630 account to. 49 00:03:49,320 --> 00:03:51,600 And then what we're going to do is some docker magic. 50 00:03:52,080 --> 00:03:55,590 OK, so a docker just to kind of break it down. 51 00:03:55,590 --> 00:03:56,850 Docker's, not virtualization. 52 00:03:57,060 --> 00:04:03,330 So with our VM where workstation hypervisor, we are virtualizing the hardware docker virtualize apps. 53 00:04:04,020 --> 00:04:09,690 So with VMware you can have multiple operating systems running on the same host operating system. 54 00:04:10,200 --> 00:04:14,670 In Docker, you have one operating system which is called the host. 55 00:04:15,060 --> 00:04:21,120 In this case, it's going to be about 220 and you can have multiple apps or containers that are completely 56 00:04:21,120 --> 00:04:25,410 isolated from each other, sharing the same kernel, sharing the same operating system apart. 57 00:04:25,680 --> 00:04:32,970 So what we're going to do in Docker is we're going to say, Docker, run, run means pull down the latest 58 00:04:33,420 --> 00:04:35,700 container that actually what run does. 59 00:04:36,210 --> 00:04:38,250 Actually, what it's saying is pull down the latest Docker image. 60 00:04:38,690 --> 00:04:41,520 Think about it image kind of like an ice or file for a CD. 61 00:04:41,910 --> 00:04:43,590 You don't actually run the image. 62 00:04:43,590 --> 00:04:46,950 Usually you make a copy of it and then the copy is the container. 63 00:04:47,610 --> 00:04:52,090 So the CD itself is like an image, the copy of that eye. 64 00:04:52,140 --> 00:04:55,380 So it's like a container and we can run it. 65 00:04:56,460 --> 00:04:58,680 Dash, dash, R.M. just as clean up after it ends. 66 00:04:59,220 --> 00:05:01,410 What we're doing is we just want to make sure that Docker works. 67 00:05:04,170 --> 00:05:09,480 That is DTAP completed that name there and I'm going to press enter in a moment. 68 00:05:09,480 --> 00:05:10,830 I just want to explain what this does here. 69 00:05:11,340 --> 00:05:14,640 This is the preference for our ports and networking. 70 00:05:14,640 --> 00:05:16,440 We're saying we want to take. 71 00:05:16,950 --> 00:05:20,310 So in the container, Liston's dewdrop listens on Port 3000. 72 00:05:21,410 --> 00:05:27,170 And we want to map it to Port 3000 when our host, which is our number TVM, if we left this part off, 73 00:05:27,980 --> 00:05:32,540 then we would back up 3000 to a random port on our host. 74 00:05:32,780 --> 00:05:38,240 So we're just basically saying when we hit Port 3000 on our host them for that Port 320 in a container. 75 00:05:40,680 --> 00:05:41,760 All right, what about Iran? 76 00:05:42,000 --> 00:05:44,850 Oh, I think I forgot to add a tech. 77 00:05:49,480 --> 00:05:54,490 All right, Sweets, we've got that running, so I'm going to press control, see to end this process 78 00:05:54,490 --> 00:05:54,880 for now. 79 00:05:55,150 --> 00:05:59,110 And then in the next lecture, we are going to set up to shop completely. 80 00:05:59,120 --> 00:06:03,580 So we're going to do something that's kind of difficult and a little bit advanced because we need to 81 00:06:03,580 --> 00:06:07,390 forward the logs from within our container. 82 00:06:08,440 --> 00:06:13,150 To the host, and then we have to set up a Splunk forwarder to ingest the logs in the house and ship 83 00:06:13,150 --> 00:06:13,690 it to Splunk. 84 00:06:14,290 --> 00:06:16,590 Sounds complicated and actually it kind of is. 85 00:06:16,600 --> 00:06:17,550 So I'm not gonna lie about that. 86 00:06:17,560 --> 00:06:20,790 But if you just follow me step by step, you should be able to pull this off this way. 87 00:06:21,130 --> 00:06:25,240 And if you have any questions, just hit me up in the comments and I'll be sure to help you out. 88 00:06:25,240 --> 00:06:25,480 All right. 89 00:06:25,870 --> 00:06:28,030 So it's going to take control in this for now. 90 00:06:28,480 --> 00:06:30,970 And we'll come back and pick this up in the next lecture right by.