1
00:00:04,140 --> 00:00:04,770
All right.

2
00:00:04,830 --> 00:00:10,530
We have just made the notes of two comments that we have used for lounge of my Skrill and BHP my Edmond

3
00:00:10,530 --> 00:00:13,720
containers and we will get back to them a bit later.

4
00:00:13,840 --> 00:00:19,950
For now let's again greed to busy box containers and less try to perform communication between them

5
00:00:20,010 --> 00:00:23,310
using host names or names or doors containers.

6
00:00:23,320 --> 00:00:23,980
Let's do that.

7
00:00:24,250 --> 00:00:25,440
Let's lounge first.

8
00:00:25,440 --> 00:00:33,840
Busy Box container here Docker around this idea busy box with me open up new tab and here will be another

9
00:00:33,910 --> 00:00:42,250
busy box container dock out Ron that's a deep Busy Box and let me verify which IP addresses we're assigned

10
00:00:42,260 --> 00:00:44,340
to those containers hostname.

11
00:00:44,480 --> 00:00:51,390
This I actually those IP addresses are the same as well signed before but again the reason for that

12
00:00:51,420 --> 00:00:55,680
is that there are no other containers currently running in our setup.

13
00:00:55,890 --> 00:01:02,130
If they are where additional containers with IP addresses that are used to here now for example this

14
00:01:02,130 --> 00:01:09,060
one then a NAS or IP addresses will get assigned to those busy box containers like 17 or 517 or 6 and

15
00:01:09,060 --> 00:01:09,660
so on.

16
00:01:09,820 --> 00:01:13,140
All right let's check the IP address of this container hostname.

17
00:01:13,140 --> 00:01:18,090
This I and it has address one hundred seventy two 17 0 2.

18
00:01:18,300 --> 00:01:24,980
And if you will type hostname like so you could get hostname of this container of the Sarah.

19
00:01:25,320 --> 00:01:28,850
Also same here host name.

20
00:01:29,280 --> 00:01:36,510
And let's not try to be in this busy box Sarah by using its hostname this one.

21
00:01:36,510 --> 00:01:38,610
Let me quote this hostname from here.

22
00:01:38,700 --> 00:01:46,550
Go to this busy box container and use same command but base now hostname instead of APL address let's

23
00:01:46,560 --> 00:01:55,740
press enter and I see answer best address and that means that we are not able to connect to this busy

24
00:01:55,740 --> 00:01:59,280
box container using its hostname.

25
00:01:59,280 --> 00:02:00,660
Let me also show you something.

26
00:02:00,900 --> 00:02:09,000
Let's open up new type and docker P.S. here and let's use Docker inspect command and the type here.

27
00:02:09,020 --> 00:02:17,310
Idea of for example this container 3 9 like so and you'll see again IP address of this container.

28
00:02:17,310 --> 00:02:23,670
Here what is Gateway default gateway that is the same for both containers and here above.

29
00:02:23,680 --> 00:02:31,050
You'll see also fueled cold aliases and now with a set to No no let me show you how we're able to set

30
00:02:31,050 --> 00:02:38,860
custom alias for this container actually let's go back here and let's exit from this container and eggs

31
00:02:38,890 --> 00:02:44,070
it from this container as well and now let me type Docker on Iran.

32
00:02:44,070 --> 00:02:45,370
Does this help.

33
00:02:45,580 --> 00:02:50,780
And the here in this output you should see one option gold age.

34
00:02:50,940 --> 00:02:57,240
Here it is somewhere above that age and here you see the screen it does contain the hostname it means

35
00:02:57,240 --> 00:03:03,120
that using this option you are able to override default hostname that will be assigned to a specific

36
00:03:03,120 --> 00:03:04,410
container.

37
00:03:04,500 --> 00:03:11,350
Also you are able as you already know using option does desk name it is somewhere here.

38
00:03:11,640 --> 00:03:12,850
And yes here it is.

39
00:03:12,870 --> 00:03:19,890
There's this name you are able to assign custom name to the container kept that by default Docker a

40
00:03:19,920 --> 00:03:22,500
science randomly generated name container.

41
00:03:23,130 --> 00:03:25,910
And now let's try to use both options.

42
00:03:25,920 --> 00:03:34,410
Does that name and dash H hostname and assign custom names hostname and the container name to those

43
00:03:34,470 --> 00:03:41,030
busy box containers and verify whether Sampson will change and whether we will be able to connect being

44
00:03:41,430 --> 00:03:45,750
one container from a NAS or using AIS or container name or hostname or not.

45
00:03:46,320 --> 00:03:47,090
Let's do that.

46
00:03:47,220 --> 00:03:55,920
Let me clear a terminal and here will be busy Box 1 Docker run this idea let's use first option does

47
00:03:56,160 --> 00:04:06,000
this name here let's named busier books 1 and next let's use this H option stands for hostname and he'll

48
00:04:06,000 --> 00:04:12,870
let's say I'll use hostname busy books this one I have used different names in order to distinguish

49
00:04:12,870 --> 00:04:16,170
between hostname and the name of the container.

50
00:04:16,350 --> 00:04:22,650
And finally let's use the name of the image it just busy box let's press enter and now we are in CHL

51
00:04:22,890 --> 00:04:30,030
instead of this busy box one container and you file and our host name I should see busy books this one

52
00:04:30,510 --> 00:04:39,080
and if I'll answer hostname this I host name this I I should see IP address of this busy box one container

53
00:04:39,490 --> 00:04:46,030
let's do the same and let's create in similar way second busy books to container let's do that here.

54
00:04:46,380 --> 00:04:55,320
Dr. Ron this idea there's this name name will be busy books doom and hostname will be busy books that

55
00:04:55,470 --> 00:05:02,670
do and here will the name of the image busy box let's press enter and we are now in CHL here in the

56
00:05:02,670 --> 00:05:10,050
second container hostname we'll provide those hostname of the second container busy bookstore and the

57
00:05:10,050 --> 00:05:17,190
host name this I will provide us a biologist on this container let's as before try to pin the good thoughts

58
00:05:17,190 --> 00:05:22,560
to busy box container using its API address this one in order to verify connection between those two

59
00:05:22,560 --> 00:05:30,180
containers being one hundred seventy two seventeen oh two I'll get a response of course but if I'll

60
00:05:30,180 --> 00:05:39,480
try to be in good by hostname busy books this one I'll get better arduous busy books 1 Same response

61
00:05:39,570 --> 00:05:47,080
I'll get if I'll try it to be by using the name of this container its name is busy books 1 Let's do

62
00:05:47,080 --> 00:05:47,740
that.

63
00:05:47,810 --> 00:05:56,540
Been busy books one like so and again but arduous busy books 1 if I go to this the last step and enter

64
00:05:56,560 --> 00:06:05,360
here again Docker appears and afterwords enter Docker inspect Docker inspect and here let's inspect

65
00:06:05,560 --> 00:06:11,560
busy box one container by the way notice here custom names that were assigned to those containers and

66
00:06:11,560 --> 00:06:16,810
desert because we have used their desk name option when we have started those two containers and here

67
00:06:16,840 --> 00:06:23,410
let's inspect for example busy box one busy box one I could use eyes or name or I.D. of the container

68
00:06:23,930 --> 00:06:31,300
let's press enter and I see IPR there's this container but aliases is still set to know if I'll go to

69
00:06:31,300 --> 00:06:38,380
this four step and try to perform same action as with it on busy book storm for example Bianca busy

70
00:06:38,740 --> 00:06:48,520
books to or been busy books this too I'll get same response but address and the reason for that is that

71
00:06:48,580 --> 00:06:55,480
by default in default breach network you are not able to communicate between different containers using

72
00:06:55,570 --> 00:07:02,650
their names or horse names but as a rule in Docker I don't know whether it will change in the future

73
00:07:02,680 --> 00:07:09,180
or not but at the moment it is like this actually if you want to perform communication between a container

74
00:07:09,180 --> 00:07:16,720
of using their names you need to create first custom breach network and then create containers inside

75
00:07:16,720 --> 00:07:24,190
of debt custom breach network and let me next explain you how you're able to create custom network using

76
00:07:24,190 --> 00:07:29,830
the Docker and the create new containers inside of that custom network I'll see you next.

77
00:07:29,860 --> 00:07:30,280
Bye bye.

