1 00:00:00,880 --> 00:00:05,590 In last section we started up a new copy of the reddest container image inside there. 2 00:00:05,590 --> 00:00:10,780 We have a running copy of the red a server and we now need to figure out how we can somehow start up 3 00:00:11,110 --> 00:00:12,250 the reddest Seelye. 4 00:00:12,310 --> 00:00:18,460 Also inside of that container to do so we're going to be making use of another Docker command so the 5 00:00:18,460 --> 00:00:20,730 docker command we're going to use is Docker. 6 00:00:20,740 --> 00:00:21,450 Exactly. 7 00:00:21,670 --> 00:00:22,090 Exactly. 8 00:00:22,090 --> 00:00:28,160 Short for execute and we use it to execute an additional command inside of a container. 9 00:00:28,240 --> 00:00:33,680 We're going to write Docker exec well then put down I T dash I T. 10 00:00:33,940 --> 00:00:39,820 This little argument right here allows us to type input directly into the container we then provide 11 00:00:39,820 --> 00:00:44,770 the container I.D. and then the command that we want to execute inside the container. 12 00:00:44,830 --> 00:00:47,520 So let's try doing this right now and seeing what happens. 13 00:00:49,070 --> 00:00:51,020 I'm going to first go back over to my terminal. 14 00:00:51,050 --> 00:00:53,960 I'm going to verify that my red is container is still running. 15 00:00:53,990 --> 00:00:59,030 I can either look at it inside the running window or alternatively I could run Docker P.S. and see yep 16 00:00:59,180 --> 00:01:01,460 I still have that red is image still going. 17 00:01:03,170 --> 00:01:09,500 So then to start up a second program inside the container or run a docker exec loops forgot one thing 18 00:01:09,500 --> 00:01:14,360 here we got to get the containers I.D. We'll do Docker P.S. And there's the idea right there. 19 00:01:14,600 --> 00:01:22,240 So I'll do Docker exec dash I.T. I'll paste in the I.D. and then the command that I want to execute 20 00:01:22,250 --> 00:01:26,790 inside there is reticence dash CSI. 21 00:01:27,020 --> 00:01:31,130 And when I do so you'll see that I now get that a little bit more familiar looking command prompt here 22 00:01:31,430 --> 00:01:39,390 and I can write out something like set my value five and get my value in it retrieves five. 23 00:01:39,530 --> 00:01:45,590 So by using the exact command we were able to start up a second running program inside of our container 24 00:01:46,280 --> 00:01:52,580 and the dash I.T. flag right here allowed us to enter in text on our keyboard and have it be sent into 25 00:01:52,580 --> 00:01:57,950 that running container as a very quick exercise let's try removing the I.T. flag there and seeing what 26 00:01:57,950 --> 00:01:59,600 happens. 27 00:01:59,600 --> 00:02:05,570 I'm going to exit this by hitting control see on my keyboard and then I'll do Docker exact again but 28 00:02:05,570 --> 00:02:09,150 this time I'm going to leave off the I.T. flags. 29 00:02:09,170 --> 00:02:15,650 So I'll do Docker exactly the I.D. and then read as CLIA and you'll notice that this time around I just 30 00:02:15,650 --> 00:02:17,890 got kicked directly back to my terminal. 31 00:02:18,500 --> 00:02:24,470 I got kicked directly back because red AC Ly was started up but we did not get the ability to enter 32 00:02:24,470 --> 00:02:26,090 in any text. 33 00:02:26,090 --> 00:02:30,800 So when Red Acela was started up but it very quickly realized hey I don't have any possibility of getting 34 00:02:30,800 --> 00:02:37,450 any text input it decided to just entirely closed down and kick us back to our terminal. 35 00:02:37,460 --> 00:02:42,740 Now this idea behind kind of adding on the side t flag and adding in text here is actually something 36 00:02:42,740 --> 00:02:45,160 that's rather important in the world of Docker. 37 00:02:45,190 --> 00:02:48,770 So let's take a quick pause right here and we're going to come back in the next section and kind of 38 00:02:48,770 --> 00:02:51,320 expand upon what I.T. right here means. 39 00:02:51,320 --> 00:02:52,490 So I'll see you in just a minute.