1 00:00:00,960 --> 00:00:05,280 In last section we learned how to start up a shell inside of a container at the instant that it was 2 00:00:05,280 --> 00:00:06,640 started. 3 00:00:06,790 --> 00:00:11,710 By the way if you have a little bit of trouble exiting from this by hitting control C which is usually 4 00:00:11,710 --> 00:00:16,570 how we exit out of a container remember you can either press controlled D on your keyboard or you can 5 00:00:16,570 --> 00:00:20,260 just type in exit like so and it will kick you back out. 6 00:00:20,460 --> 00:00:25,720 Now in this section there's one very small gotcha maybe not even a gotcha but just a very particular 7 00:00:25,720 --> 00:00:31,190 thing that I want to go over to make sure that it's really crystal clear on how containers behave. 8 00:00:31,360 --> 00:00:35,740 I want you to recall back to a little bit ago when we were initially talking about what a container 9 00:00:35,740 --> 00:00:36,970 is. 10 00:00:36,970 --> 00:00:42,310 Remember that we gave this example of where Chrome had needed a particular version of Python and no 11 00:00:42,310 --> 00:00:47,830 J.S. needed its own version of Python and we had said that through that name spacing feature we can 12 00:00:47,830 --> 00:00:51,930 kind of imagine that our hard disk had two little segments carved out of it. 13 00:00:52,360 --> 00:00:58,540 And anytime chrome tried to access that hard drive it would get its own segment any time no J.S. tried 14 00:00:58,540 --> 00:01:03,310 to access the hard drive it would get its own different segment and so the thing that wants to make 15 00:01:03,310 --> 00:01:09,760 sure is really crystal clear is that between two containers they do not automatically share their file 16 00:01:09,760 --> 00:01:11,240 system. 17 00:01:11,440 --> 00:01:15,680 We're gonna do a quick demo inside of our terminal just to really confirm that that is the case. 18 00:01:15,880 --> 00:01:21,910 So I'm going to open up my terminal and I'm going to start up a new instance of that busy box image 19 00:01:22,360 --> 00:01:24,450 and I'm going to start up a shell inside there. 20 00:01:24,880 --> 00:01:31,880 So I'll do Docker run dash I.T. Busy Box shell. 21 00:01:32,120 --> 00:01:38,180 So now I can list my files and folders inside of here and I see just these default folders I'm now going 22 00:01:38,180 --> 00:01:44,490 to open up a second terminal window and I'm going to start a second container with the same parameters. 23 00:01:44,720 --> 00:01:55,600 So second turn a window and I'll do Docker run dash I.T. Busy Box SDH now going to open up one more 24 00:01:55,600 --> 00:01:56,360 terminal window. 25 00:01:56,380 --> 00:02:02,440 So this is gonna be a third one and inside of here I'll do Docker piece and I can verify that I have 26 00:02:02,440 --> 00:02:06,610 two separate containers both running a show. 27 00:02:06,610 --> 00:02:11,650 Now I'm gonna go to the first terminal window and inside of here I'm going to create a new file with 28 00:02:11,860 --> 00:02:12,840 touch. 29 00:02:12,850 --> 00:02:17,680 Hi there like so that's going gonna create a new file called Hi there. 30 00:02:17,680 --> 00:02:22,660 There it is right there I can run less and I'll see the file up here right away. 31 00:02:22,660 --> 00:02:23,680 Now here's the fun part. 32 00:02:23,680 --> 00:02:30,590 We're gonna go over these second terminal window and I'll do an Ellis over here as well. 33 00:02:30,710 --> 00:02:35,570 And of course I am not going to see that file of hi there because these two running containers have 34 00:02:35,630 --> 00:02:41,360 absolutely completely separate file systems and there's no sharing of data between the two. 35 00:02:41,360 --> 00:02:45,690 Again this is kind of a small thing but I just want to make sure there was very crystal clear. 36 00:02:45,740 --> 00:02:51,840 So in general unless you and I specifically form up a connection between two containers we really consider 37 00:02:51,840 --> 00:02:57,190 them to be more or less completely isolated from each other and totally separate. 38 00:02:57,200 --> 00:02:57,540 All right. 39 00:02:57,650 --> 00:02:58,590 So that's pretty much it. 40 00:02:58,610 --> 00:03:02,410 On the basics of Docker so we're gonna take a quick pause right here. 41 00:03:02,420 --> 00:03:03,740 We're gonna come back the next section. 42 00:03:03,740 --> 00:03:07,070 We're gonna start moving on to the next big topic that we're going to cover. 43 00:03:07,100 --> 00:03:08,320 So I'll see you in just a minute.