1
00:00:04,130 --> 00:00:10,400
We have just successfully agreed the first to mongo container and we have seen the some logs in the

2
00:00:10,400 --> 00:00:16,100
terminal but now we are not able to interact with this process because we're actually connected to mongo

3
00:00:16,100 --> 00:00:17,060
deep waters.

4
00:00:17,120 --> 00:00:19,370
That stands for Mongo database.

5
00:00:19,520 --> 00:00:24,950
Knowing this Loescher I'll demonstrate to you how you are able to create additional brought us inside

6
00:00:24,950 --> 00:00:28,790
of the container and perform some actions inside of the process.

7
00:00:28,790 --> 00:00:35,580
For example you are able to create the bash or c h shell process or you are able to launch Mongo shell

8
00:00:35,580 --> 00:00:36,590
brought us.

9
00:00:36,590 --> 00:00:38,030
All right let's try that.

10
00:00:38,030 --> 00:00:44,030
Here in this location and also I'll explain what happens under the hood basically when you create Mongo

11
00:00:44,030 --> 00:00:44,870
container.

12
00:00:44,870 --> 00:00:46,550
So this lecture is very important.

13
00:00:46,550 --> 00:00:47,890
Please don't skip it.

14
00:00:47,900 --> 00:00:48,450
Great.

15
00:00:48,470 --> 00:00:55,070
Let's open up but new tab and let's first have a look at containers that are currently running Docker

16
00:00:55,180 --> 00:01:00,580
B.S. and there was some good container that was created from mongo image.

17
00:01:00,580 --> 00:01:07,940
Notice that the container Alison's at Port went to 7 0 1 7 or DCP and that is actually the default to

18
00:01:08,000 --> 00:01:09,890
mongo deep port.

19
00:01:10,070 --> 00:01:17,070
And also notice that command that was executed upon start upon a creation of this container was Docker

20
00:01:17,130 --> 00:01:19,190
and three point dot c h.

21
00:01:19,310 --> 00:01:20,920
It is not Mongo deep.

22
00:01:21,230 --> 00:01:28,130
And before explaining what the docker entry point does C H means let me show you how we're able to start

23
00:01:28,190 --> 00:01:34,210
additional brought us inside of this container and we will try to start first bash shell brought us

24
00:01:34,420 --> 00:01:35,230
all right.

25
00:01:35,270 --> 00:01:41,550
For that you could simply use additional dock our command gold Docker exact or docker container.

26
00:01:41,960 --> 00:01:47,880
If you'll have a look at the amounts Docker does help you'll find the exact command somewhere.

27
00:01:47,890 --> 00:01:50,660
Here let me scroll a bit up.

28
00:01:50,720 --> 00:01:57,320
So here is this command run a command in a running container and that's what we actually need to do.

29
00:01:57,470 --> 00:02:00,950
We need to launch additional process inside of the run container.

30
00:02:01,310 --> 00:02:09,050
And also if I'll have a look at the help for docker container you should also find the same command

31
00:02:09,080 --> 00:02:09,770
there.

32
00:02:09,770 --> 00:02:11,220
Let me scroll a bit up.

33
00:02:12,650 --> 00:02:15,870
Yes here is this command run a command and Orion container.

34
00:02:16,010 --> 00:02:20,530
So you're able to use eyes on Docker exact comment or docker container exact.

35
00:02:20,840 --> 00:02:25,360
I prefer to use the shorter versions of all commands Docker Exactly.

36
00:02:25,370 --> 00:02:29,490
Next comes a D or name of the container the discount Iran.

37
00:02:29,780 --> 00:02:36,410
And basically let me quickly find out this idea you could use eyes of this I.D. as usually or this random

38
00:02:36,410 --> 00:02:42,140
name or you are able to assign a custom manual name when you start your container.

39
00:02:42,500 --> 00:02:50,330
So I'll use the first two characters of this idea and talker exactly 5 7 and we are able to start eyes

40
00:02:50,330 --> 00:02:52,640
or see a show or better show.

41
00:02:52,700 --> 00:02:57,020
Basically both executable are available inside of the Mongo image.

42
00:02:57,050 --> 00:03:02,780
Let's allow best left press enter and we see that we have redone the back to our terminal.

43
00:03:02,780 --> 00:03:05,300
Could you please answer the question why this happened

44
00:03:10,060 --> 00:03:11,430
answer is very simple.

45
00:03:11,470 --> 00:03:17,140
We can look the connected to SD the end of this bash brought us and of course as we have seen before

46
00:03:17,140 --> 00:03:18,100
in such cases.

47
00:03:18,100 --> 00:03:25,130
C H or bash processes exit for that in order to be able to connect to best products interactively and

48
00:03:25,140 --> 00:03:25,620
greed.

49
00:03:25,680 --> 00:03:26,380
So today.

50
00:03:26,590 --> 00:03:28,620
Let's adhere to options.

51
00:03:28,740 --> 00:03:34,530
And deep like so let's not press enter and now we are connected to our container with a D.

52
00:03:34,530 --> 00:03:41,380
5 7 and so on as a root user inside of the best brought us and now we're able for example list files

53
00:03:41,380 --> 00:03:44,630
here you'll see bunch of files and folders.

54
00:03:44,680 --> 00:03:48,000
Also we're able to create additional files and folders and so on.

55
00:03:48,070 --> 00:03:52,000
Again we are connected via additional process to container.

56
00:03:52,640 --> 00:03:58,990
Let us actually try at least to all processes that are current running inside of this container because

57
00:03:59,020 --> 00:04:05,590
actually there was bashed brought us here in this window and a NAS brought us Mongo d in this step.

58
00:04:05,590 --> 00:04:06,160
Great.

59
00:04:06,160 --> 00:04:13,330
Let's now enter the s dash e command that will show us actually all processes that are running now inside

60
00:04:13,330 --> 00:04:14,370
of the container.

61
00:04:14,380 --> 00:04:21,160
Let's press enter and you see three processes thrust brought us here on this list is Mongo DB and it's

62
00:04:21,209 --> 00:04:28,340
process a D is one it is called early brought us next for this is bash it has a random process a d 1

63
00:04:28,340 --> 00:04:34,990
1 3 and there was also additional process B S that was actually just exited after we have entered this

64
00:04:35,000 --> 00:04:43,720
command and the youth process idea is 1 2 3 but again most importantly that we are able to start multiple

65
00:04:43,720 --> 00:04:45,910
processes in the same container.

66
00:04:46,070 --> 00:04:51,210
I am actually able to open up new tab like so and start additional process.

67
00:04:51,220 --> 00:05:01,510
Let me start the c h process and I'll use the same idea as I have used here 5 7 Docker exec dash item

68
00:05:01,690 --> 00:05:10,570
5 7 8 process and I am now in C H shell and if I'll have a look again at the list all protesters here

69
00:05:10,570 --> 00:05:17,020
for example I should see additional process on the list it is C H and now there are actually four processes

70
00:05:17,020 --> 00:05:23,980
surrounding it but basically P S was just terminated that's how you are able to create additional processes

71
00:05:24,220 --> 00:05:27,180
inside of running container it is a very very simple.

72
00:05:27,250 --> 00:05:31,650
And for that you should use command Docker exact or docker container.

73
00:05:31,660 --> 00:05:32,790
Exactly.

74
00:05:32,790 --> 00:05:35,580
All right let's not make apples and next let's proceed.

75
00:05:35,650 --> 00:05:36,880
And the deep freezer.

76
00:05:36,910 --> 00:05:42,990
And next I'll explain you what the entry point both c h means here in this output.

77
00:05:43,070 --> 00:05:44,110
I'll see you in a bit.

78
00:05:44,140 --> 00:05:44,520
Bye bye.

