1
00:00:04,080 --> 00:00:10,460
All right guys I have just explained you how to use the DST option along with container run command.

2
00:00:10,560 --> 00:00:15,670
Now you know difference between this identity and I.D. options and we have actually tried a different

3
00:00:16,140 --> 00:00:18,300
variance with Docker on command.

4
00:00:18,310 --> 00:00:23,830
Now it's time to start the creation of a multiple containers using the same image.

5
00:00:24,250 --> 00:00:28,330
And then this lovechild I'll create the two containers using boom too much.

6
00:00:28,390 --> 00:00:33,460
And I'll demonstrate that those containers are completely two different containers and they are fully

7
00:00:33,460 --> 00:00:34,420
independent.

8
00:00:34,600 --> 00:00:38,600
Accepted that fact that they basically share our sources of Dr Horst.

9
00:00:38,740 --> 00:00:42,340
I mean the simple Euro sources RAM and disk.

10
00:00:42,370 --> 00:00:42,880
Great.

11
00:00:42,940 --> 00:00:49,630
Let's get our hands dirty and let's create first container based on a one to image Docker run.

12
00:00:49,900 --> 00:00:56,400
That idea I use of those two options here or Wyndham because I want to look into that the container

13
00:00:56,440 --> 00:00:59,760
basically into default the brought us gold the best.

14
00:01:00,110 --> 00:01:04,099
Let's press enter and now I'm inside of the container.

15
00:01:04,150 --> 00:01:06,970
That is the thrust container that we have just created.

16
00:01:07,030 --> 00:01:10,530
Let's for example these files here and let's.

17
00:01:10,600 --> 00:01:11,580
For testing purposes.

18
00:01:11,590 --> 00:01:16,790
Create the new folder here gold dust and game design test.

19
00:01:16,870 --> 00:01:21,790
Let's see due to this dust folder and let's create here file Deitch.

20
00:01:21,990 --> 00:01:23,290
That's not the.

21
00:01:23,830 --> 00:01:29,200
And let's go back out of this dust folder and file these files and folders here.

22
00:01:29,200 --> 00:01:32,370
You'll see this dust folder here on the list.

23
00:01:32,410 --> 00:01:33,270
Wonderful.

24
00:01:33,280 --> 00:01:33,790
Let me know.

25
00:01:33,790 --> 00:01:37,170
Create one more container based on the same image.

26
00:01:37,180 --> 00:01:39,820
Want to let me open up a new tab.

27
00:01:39,820 --> 00:01:46,620
Basically let me drag this step here and put those two tabs to side by side.

28
00:01:46,650 --> 00:01:54,840
Like so because I want you to see differences between those two containers again here is the thrust

29
00:01:54,840 --> 00:02:00,110
container with the image and the handle this container we have agreed that the new folder called test

30
00:02:00,170 --> 00:02:04,080
and the inside of that folder there was a file called test takes deep.

31
00:02:04,440 --> 00:02:09,780
And here in this window let me start one more container based on the same image were wounded.

32
00:02:09,780 --> 00:02:17,720
Same command dock Iran Desk idea window container was started and noticed that there was difference

33
00:02:17,960 --> 00:02:25,040
in container I.D. here was actually idea of this container and it is automatically taken as a hostname

34
00:02:25,070 --> 00:02:26,210
of this container.

35
00:02:26,210 --> 00:02:27,540
This computer I actually.

36
00:02:27,890 --> 00:02:33,260
And here is this idea that was used for this container number one.

37
00:02:33,260 --> 00:02:33,860
Great.

38
00:02:33,980 --> 00:02:37,280
Let's now list files and folders inside of this container.

39
00:02:37,550 --> 00:02:45,740
Alas and you'll see same set of folders and files that we have seen here in this container before creation

40
00:02:45,800 --> 00:02:47,090
of the test folder.

41
00:02:47,270 --> 00:02:51,660
And there was no test folder inside of this container.

42
00:02:51,680 --> 00:03:00,230
This shows you that every container has its own separate file system and file systems of different containers

43
00:03:00,290 --> 00:03:01,560
don't overlap.

44
00:03:01,670 --> 00:03:08,100
They are completely independent but of course those file systems are stored on the same dock or host.

45
00:03:08,210 --> 00:03:13,270
In this case dock host is your dollar machine inside of which those containers are run.

46
00:03:13,460 --> 00:03:17,240
And this will dollar machine is basically running on this Mac computer.

47
00:03:17,240 --> 00:03:19,120
Same picture for Windows computer.

48
00:03:20,110 --> 00:03:20,740
Great.

49
00:03:20,800 --> 00:03:26,010
I could also create the sound files and folders inside of this container and let me do that quickly.

50
00:03:26,010 --> 00:03:32,810
For example I could create a folder called test to see need to dust too.

51
00:03:33,350 --> 00:03:35,450
And here let's create the file test.

52
00:03:35,470 --> 00:03:36,960
Do that DST.

53
00:03:37,150 --> 00:03:38,600
Let's list files here.

54
00:03:38,630 --> 00:03:41,930
You'll see test to the disks file instead of test to folder.

55
00:03:41,930 --> 00:03:48,980
And if I let c d out of this folder you'll see it that's the folder are here in the root of this container.

56
00:03:48,980 --> 00:03:54,650
And again if I repeat the same command here in container number one you'll see that there was still

57
00:03:54,790 --> 00:03:58,100
that folder and no test to a folder.

58
00:03:58,170 --> 00:04:02,290
Great that there's a difference between this container and this container.

59
00:04:02,420 --> 00:04:08,780
And now you'll see that the containers are fully independent and they again only share CB your resources

60
00:04:08,870 --> 00:04:16,120
of the docker Horst and ram it means that each of those containers may take up to 100 percent resources

61
00:04:16,250 --> 00:04:17,720
of the docker Horst.

62
00:04:17,720 --> 00:04:23,420
And of course there is the possibility to limit the maximum size of resources that each container may

63
00:04:23,420 --> 00:04:26,950
utilize and we will get back to that later on in this course.

64
00:04:26,960 --> 00:04:32,240
Also you'll see that the doors containers have different host names and actually you could verify hostname

65
00:04:32,240 --> 00:04:37,260
by typing the host named command like so and you'll see a host name of this container.

66
00:04:37,340 --> 00:04:42,050
And actually this last name is shown here after a log in into the container.

67
00:04:42,500 --> 00:04:48,290
And if you would like to check hostname he on this container you could use same command hostname and

68
00:04:48,290 --> 00:04:50,870
you'll see hostname of this container.

69
00:04:50,900 --> 00:04:56,840
We could also verify IP addresses of every container and for that you could use command hostname that

70
00:04:56,930 --> 00:05:04,670
I and hostname this I in this container and you'll see that those containers have different IP addresses

71
00:05:04,850 --> 00:05:09,980
but they're basically from the same network and that is the default the bridge network inside of the

72
00:05:09,980 --> 00:05:11,100
docker host.

73
00:05:11,180 --> 00:05:11,540
Great.

74
00:05:11,870 --> 00:05:13,680
That's the whole door's containers differ.

75
00:05:13,700 --> 00:05:20,060
And the goal of this lecture was to demonstrate that containers are full independent and have a different

76
00:05:20,240 --> 00:05:21,490
file systems.

77
00:05:21,530 --> 00:05:23,600
Let's not proceed in the next lecture.

78
00:05:23,600 --> 00:05:31,250
Let's develop this topic and let's try to create two different engine accelerators that will host different

79
00:05:31,490 --> 00:05:36,710
files from different folders and again that will prove that you are able to create multiple containers

80
00:05:36,890 --> 00:05:38,550
based on the same image.

81
00:05:38,690 --> 00:05:44,450
And one more thing that they wanted to tell you is that in this case you were not prompted to download

82
00:05:44,540 --> 00:05:50,990
any new image something girls image was already in your local cache and it was simply reused for both

83
00:05:50,990 --> 00:05:51,830
containers.

84
00:05:51,860 --> 00:05:57,030
That's why you have created the north containers pretty fast in a matter of seconds.

85
00:05:57,290 --> 00:06:03,440
And of course if I will read the new container want to contain them now it will get the clean file system

86
00:06:03,710 --> 00:06:09,320
without any test or test to folders that we have created in previous containers.

87
00:06:09,320 --> 00:06:10,000
Wonderful.

88
00:06:10,040 --> 00:06:16,340
Let's not cross it and next to let's create the two engine containers with two different set of files.

89
00:06:16,370 --> 00:06:17,020
See you next.

90
00:06:17,030 --> 00:06:17,420
Bye bye.

