1 00:00:00,900 --> 00:00:02,550 Hello, everyone, in this. 2 00:00:02,940 --> 00:00:07,040 I'm going to show you how to add resistance stories to container images. 3 00:00:07,650 --> 00:00:12,120 There are two methods or ways to add resistance stories to contain or images. 4 00:00:12,720 --> 00:00:14,900 I'm going to start with the first method. 5 00:00:14,910 --> 00:00:22,260 So first, I'm going to create a new directory and I'm going to call this directory storage, which 6 00:00:22,290 --> 00:00:26,220 inter alia, old storage. 7 00:00:28,080 --> 00:00:32,030 As we can see here, Root is the owner and the group. 8 00:00:32,040 --> 00:00:36,690 So what I'm going to do, I need to change the owner and glue for this directory. 9 00:00:37,050 --> 00:00:41,610 So so do change on them. 10 00:00:41,610 --> 00:00:52,530 To John Galán, John and the name of the directory storage and is the lead storage center. 11 00:00:52,530 --> 00:00:59,060 As you can see here, we have changed the owner and group for this directory. 12 00:01:00,360 --> 00:01:08,690 So second, I'm going to map this directly and the host to a directory inside the container. 13 00:01:09,270 --> 00:01:12,870 So I'm going to run the command post man run. 14 00:01:13,530 --> 00:01:14,760 Then the option. 15 00:01:14,760 --> 00:01:16,130 Dash, dash, briefly. 16 00:01:19,340 --> 00:01:23,150 Then dash it so the dash dash privileged. 17 00:01:24,970 --> 00:01:33,250 Why we need to use this option in order to bypass or ignore the clinics, if in case there is even a 18 00:01:33,290 --> 00:01:40,690 set to enforcing and we already know that it's this is the interactivity. 19 00:01:41,290 --> 00:01:52,210 Why mode and for the Dash V, we need to use this option in order to look look at the volume on the 20 00:01:52,210 --> 00:02:00,460 host and on the volume of the container so that this is the option that I was talking about. 21 00:02:00,820 --> 00:02:10,990 Then we need to ride the bath, which is the directory storage, then SLI, then storage before we going 22 00:02:10,990 --> 00:02:18,150 to do the slash because we were going to mount this directory to another directory inside the container. 23 00:02:18,160 --> 00:02:21,860 So calling then slash storage. 24 00:02:21,860 --> 00:02:30,790 So I'm going to create another directory with the same name and what inside the container and the image 25 00:02:30,790 --> 00:02:38,710 that I'm going to use, I'm going to use Fedora, I'm going to this this image then slash pain, because 26 00:02:38,710 --> 00:02:47,020 after I'm going to run this one, I would like to get an access to the Basche slash slash bash. 27 00:02:47,770 --> 00:02:49,870 Then I hit enter. 28 00:02:51,540 --> 00:02:56,960 Perfect right now, as we can see over here, we are inside the container, so I can double check ATC 29 00:02:56,970 --> 00:03:00,030 slash, always release, hit enter. 30 00:03:00,390 --> 00:03:04,710 We are inside this container and I can type in less. 31 00:03:05,610 --> 00:03:08,280 And let's see, we have the stories here. 32 00:03:08,280 --> 00:03:14,520 So he raised storage so he can go inside this unless there is no. 33 00:03:15,240 --> 00:03:18,510 I'm going to add a couple files here. 34 00:03:19,200 --> 00:03:19,890 If one. 35 00:03:19,890 --> 00:03:21,210 If two if. 36 00:03:22,670 --> 00:03:32,840 If three and a hit, enter Alice, as we can see here, we have three X files or files inside this directory 37 00:03:33,020 --> 00:03:35,490 and we are ready right now inside the container. 38 00:03:35,990 --> 00:03:43,130 So what I'm going to do right now, I'm going to hit control to control Q. 39 00:03:45,030 --> 00:03:51,750 I don't want to exit from the container, so p put my purse, as we can see over here. 40 00:03:52,620 --> 00:03:54,410 The container is still running. 41 00:03:55,510 --> 00:03:59,100 I just, you know, through the screens here, the container is still running. 42 00:04:00,400 --> 00:04:04,130 What I'm going to let me to double check so we can go to the store. 43 00:04:04,140 --> 00:04:13,500 We are now on the machine and the user, John, saw storage just to double check that we have the text 44 00:04:13,500 --> 00:04:13,910 files. 45 00:04:13,920 --> 00:04:19,019 As we can see right now, we have F1, F2 and EF three. 46 00:04:19,600 --> 00:04:24,210 Let me add also three five. 47 00:04:24,230 --> 00:04:33,070 So if for if five and F six to enter else we have six fires now. 48 00:04:33,390 --> 00:04:36,440 OK, I'm going to run the command, put my purse. 49 00:04:37,050 --> 00:04:43,140 So it is the container image and I'm going to run the I'm going to execute a command 50 00:04:45,630 --> 00:04:57,160 and then execute it so I can't get either the name if I want or I can't get the container ID. 51 00:04:57,360 --> 00:04:59,250 That's when you get the container ID here 52 00:05:01,800 --> 00:05:02,550 first. 53 00:05:03,420 --> 00:05:04,260 Then what. 54 00:05:04,520 --> 00:05:14,400 Let's just run unless the shell or I want to maybe do the bean bags, I kind of go inside the container 55 00:05:14,670 --> 00:05:15,740 into perfect. 56 00:05:15,750 --> 00:05:19,380 We are inside the container so stotish it into Alice. 57 00:05:19,680 --> 00:05:24,480 As we can see over here we have this three new Fites. 58 00:05:25,920 --> 00:05:32,040 So control feed and control Q p q 59 00:05:35,700 --> 00:05:37,110 well we already outside. 60 00:05:37,110 --> 00:05:37,470 Perfect. 61 00:05:37,470 --> 00:05:39,630 So I'm going to clean the screen. 62 00:05:43,980 --> 00:05:47,340 Now I'm going to show you the second MyFord. 63 00:05:48,660 --> 00:05:50,730 So I just already show you that are the first. 64 00:05:51,020 --> 00:05:53,010 Now let's move on to the second method. 65 00:05:53,430 --> 00:05:57,000 So I'm going also to create a new jet, actually. 66 00:05:57,000 --> 00:06:03,810 So this time I'm going to create a directory, make a directory, and I'm going to call this directory 67 00:06:03,810 --> 00:06:04,410 share. 68 00:06:06,410 --> 00:06:15,590 I've never asked for any special share, as we can see here, we have the robot is the owner and the 69 00:06:15,590 --> 00:06:15,920 group. 70 00:06:16,010 --> 00:06:17,070 We need to change that. 71 00:06:17,090 --> 00:06:18,230 So change. 72 00:06:20,070 --> 00:06:26,090 Change on to John, John to this file. 73 00:06:26,400 --> 00:06:27,060 Perfect. 74 00:06:28,560 --> 00:06:31,770 We have changed the owner and the group for District three. 75 00:06:32,850 --> 00:06:39,930 Now what I'm going to do, I'm going to run the command post, man, run dash eite. 76 00:06:41,270 --> 00:06:49,310 And, Ashleigh, I already explained about the dash it so that it is an extra active duty y mode and 77 00:06:49,310 --> 00:06:56,780 the Dash V, you know, the dash fee dash feeds in order to locate the volume on the horse and on the 78 00:06:56,780 --> 00:06:57,320 value. 79 00:06:58,560 --> 00:07:06,440 On the volume of the container, so there is there is one difference, I know it's kind similar to the 80 00:07:06,440 --> 00:07:08,570 to the first method, but here we go. 81 00:07:08,570 --> 00:07:10,090 And I'm not going to use the dash. 82 00:07:10,100 --> 00:07:10,870 That's perfect. 83 00:07:11,240 --> 00:07:23,190 So I'm going to tie up the share file so the share shareholders share directly then colon slash. 84 00:07:23,210 --> 00:07:32,810 And I'm going to call this also share, then call an uppercase sit where we need to use that in order 85 00:07:32,810 --> 00:07:39,360 to pass and ignore the index in case of the Aislinn Index is index is set to enforcing. 86 00:07:39,710 --> 00:07:41,630 So this is kind of the only difference. 87 00:07:41,630 --> 00:07:48,890 Before we didn't use the call and said we use the dash dash privileged and this time I'm going to use 88 00:07:48,890 --> 00:07:56,880 this image up until then, slash bin, slash slash brush. 89 00:07:56,900 --> 00:08:01,820 I want to go inside, I'm going to pull it and we can go inside this. 90 00:08:03,450 --> 00:08:04,050 Image. 91 00:08:08,090 --> 00:08:15,950 Perfect right now, so can't ATC signal its release, as we can see here, it's a container. 92 00:08:16,460 --> 00:08:17,910 It's supposed to contain our image. 93 00:08:19,070 --> 00:08:25,330 Now what I'm going to do so let's go inside the shower just to double check. 94 00:08:25,340 --> 00:08:26,990 Yeah, we have this file ellis'. 95 00:08:26,990 --> 00:08:29,690 OK, so touch EF1. 96 00:08:30,560 --> 00:08:31,620 I'm going to change this. 97 00:08:31,750 --> 00:08:34,850 So do you want these two and three? 98 00:08:36,490 --> 00:08:40,460 Alice, now I'm going to take control to control. 99 00:08:41,000 --> 00:08:42,640 We are outside of the container. 100 00:08:42,659 --> 00:08:50,460 However, we didn't close the container of the container still running see here, because I what I did 101 00:08:50,790 --> 00:08:56,310 on the keyboard inside, I press control, speed and control keel. 102 00:08:57,270 --> 00:09:00,860 And let's go now inside the shared folder. 103 00:09:00,870 --> 00:09:02,130 It is perfect. 104 00:09:02,130 --> 00:09:17,670 We have three files, so I'm going to add these for these five and six enter and I know what I'm going 105 00:09:17,670 --> 00:09:18,120 to do. 106 00:09:18,120 --> 00:09:18,870 Put man. 107 00:09:21,440 --> 00:09:28,040 But maps, it's just the image or the content of it for Ubuntu. 108 00:09:28,070 --> 00:09:34,870 I'm going to go with this one and I'm going to execute the commands or executed shyte. 109 00:09:35,930 --> 00:09:47,450 So the containerised here, the secretary for a Ponto, then slash bean slash bash enter unless we have 110 00:09:47,450 --> 00:09:47,920 the share. 111 00:09:47,920 --> 00:09:50,720 Here we go inside that folder. 112 00:09:55,220 --> 00:10:01,310 Alas, as we can see here, we have the three fires here, the 45 and the six. 113 00:10:04,530 --> 00:10:07,050 Next, I'm going to show you an example. 114 00:10:08,420 --> 00:10:09,290 How to? 115 00:10:11,240 --> 00:10:16,030 To show an example, how to add persistent stories to my Eskil or Maria DBE. 116 00:10:17,160 --> 00:10:25,650 So I just what they did in the last two methods, I just show you how to mount or to add in storage 117 00:10:26,160 --> 00:10:30,490 on the local machine to to the container. 118 00:10:31,890 --> 00:10:32,790 I have a file. 119 00:10:32,790 --> 00:10:34,710 We're going to do the same steps. 120 00:10:34,890 --> 00:10:36,150 Maybe the first four. 121 00:10:36,330 --> 00:10:37,080 Let's do so. 122 00:10:37,080 --> 00:10:46,560 I'm going to to create a directory here and I'm going to call that directory database as Dash Dash Helda 123 00:10:47,400 --> 00:10:48,430 database. 124 00:10:48,440 --> 00:11:00,480 So we going to change this one, change the owner groups who do change on to John and John to database. 125 00:11:03,350 --> 00:11:08,250 Now we're going to run down this duck-billed, as we can see over here. 126 00:11:08,270 --> 00:11:11,390 So John is the owner and the group for this directory. 127 00:11:11,990 --> 00:11:21,770 And so we as we can see over here, since we get to do, as I said, that I want to add a persistent 128 00:11:21,770 --> 00:11:23,750 Stotish to my skill on Maria DBI. 129 00:11:24,260 --> 00:11:26,330 I have a text file here for my skill. 130 00:11:28,350 --> 00:11:33,580 Uh, so I'm going to use this file to either process a story. 131 00:11:33,950 --> 00:11:40,810 This is inside my local machine and here inside, this is what I'm going to do inside Maria EDB. 132 00:11:40,820 --> 00:11:45,910 However, as we can see here, over here for the permission for the group, we don't have rights. 133 00:11:45,950 --> 00:11:48,470 This is a database and also for others. 134 00:11:48,480 --> 00:11:57,080 So I suggest that we should change the mode or the permission here to add a write permission to this 135 00:11:57,080 --> 00:11:57,650 directory. 136 00:11:58,130 --> 00:12:01,040 So so do change mode. 137 00:12:03,560 --> 00:12:04,160 Change mode. 138 00:12:04,180 --> 00:12:22,850 So I will care less w then O plus W to the date of his return to the less old and storage the database. 139 00:12:26,640 --> 00:12:33,240 Yeah, so we give her all right permission to that, so as we can see over here, this is the command 140 00:12:33,240 --> 00:12:34,720 that we need to run right now. 141 00:12:35,490 --> 00:12:38,310 So it's an order commands around Dashti. 142 00:12:38,310 --> 00:12:43,920 So this is the demon surface or the Dutch mode and the name. 143 00:12:43,920 --> 00:12:46,590 So I'm going to add a name and a Dash V. 144 00:12:47,480 --> 00:12:50,490 We're going to use the second method, if you guys remember the second method here. 145 00:12:50,960 --> 00:12:58,730 So this in order to ignore it, if it's enforcing and the dash, it's up to you if you want to use a 146 00:12:58,730 --> 00:12:59,130 port. 147 00:12:59,190 --> 00:13:07,470 No, I want to use it two or three thousand four from the mapping from the localhost to the to the container. 148 00:13:07,490 --> 00:13:10,390 Then he is the environment variables. 149 00:13:10,790 --> 00:13:16,880 So we have one to do so before each environment environment variable. 150 00:13:16,880 --> 00:13:24,050 We need to use the dashi, then equal the the variable that we want to use. 151 00:13:24,080 --> 00:13:28,340 And so I'm going to run this command, as we can see here. 152 00:13:28,340 --> 00:13:32,330 And this is the image or the container image. 153 00:13:32,330 --> 00:13:36,260 So covid this one, paste it. 154 00:13:37,070 --> 00:13:38,930 I'm going to run it right now. 155 00:13:53,410 --> 00:14:00,970 So the words were just for a few seconds in order to pull the image, but everything is OK after we 156 00:14:00,970 --> 00:14:03,850 going to pull the image and get the image there. 157 00:14:03,940 --> 00:14:07,830 So what we're going to do, we're going to execute a command order. 158 00:14:07,840 --> 00:14:09,750 So I'm going to clear the screen here. 159 00:14:09,760 --> 00:14:21,350 So put my foot forward and execute, then dash I and my skill. 160 00:14:21,740 --> 00:14:24,250 I'm sure that somebody will ask me said, how did you get this? 161 00:14:24,250 --> 00:14:31,120 Because I already declared when I ran the previous command that I want the name of this container image 162 00:14:32,050 --> 00:14:35,650 and I want to call it it's my skill and slash pain. 163 00:14:35,650 --> 00:14:38,430 Slash, smash hit enter. 164 00:14:38,440 --> 00:14:41,210 We are right now inside this container. 165 00:14:41,230 --> 00:14:41,980 So it is. 166 00:14:42,790 --> 00:14:46,400 And where is that folder. 167 00:14:46,420 --> 00:14:47,410 OK, I will go here. 168 00:14:47,450 --> 00:14:47,850 See. 169 00:14:47,860 --> 00:14:48,310 Oh yeah. 170 00:14:48,310 --> 00:14:50,080 It's here that it is. 171 00:14:52,830 --> 00:14:54,560 It is so touch. 172 00:14:54,670 --> 00:15:02,980 I'm going to call this one if file one file to attempt to release control Peter control queue. 173 00:15:02,980 --> 00:15:04,870 So we get out of that database. 174 00:15:05,890 --> 00:15:09,640 It can do that if you want to clear the screen. 175 00:15:09,640 --> 00:15:13,990 So it is DeShields deed in storage here. 176 00:15:15,380 --> 00:15:19,600 Uh, can you know that this is where storage. 177 00:15:20,200 --> 00:15:22,420 Let's go inside not storage. 178 00:15:22,420 --> 00:15:26,650 Sorry, database database at least as we can see here. 179 00:15:26,650 --> 00:15:29,260 We have to you Fites. 180 00:15:31,630 --> 00:15:32,970 That's conclude decision. 181 00:15:33,010 --> 00:15:33,550 Thank you. 182 00:15:34,090 --> 00:15:35,130 See you in the next.