1
00:00:00,770 --> 00:00:06,350
Unless section we created our docker file and built a new image for a new application we should now

2
00:00:06,350 --> 00:00:12,180
be able to start up our application by running docker run and that will specify the image we just created.

3
00:00:12,380 --> 00:00:22,100
So you will put in your docker username slash visit's And remember you do not have to specify the tag

4
00:00:22,130 --> 00:00:26,940
by putting on colon colon latest at the end but you actually can if you want to.

5
00:00:27,220 --> 00:00:30,370
So we can run this right here and we'll start up our application.

6
00:00:30,440 --> 00:00:32,530
No notice so we immediately get an error message.

7
00:00:32,610 --> 00:00:36,050
It says read it's connection to something something something failed.

8
00:00:36,260 --> 00:00:40,910
So our application is attempting to start up but there's no register server running for it to connect

9
00:00:40,910 --> 00:00:41,380
to.

10
00:00:41,630 --> 00:00:46,970
So in this section we're going to focus on getting a separate container running a Gratus server.

11
00:00:47,300 --> 00:00:52,500
Now as far as getting up a separate read as server goes well it's going to be pretty darn straightforward.

12
00:00:52,550 --> 00:00:59,900
We're going to run the same exact command that we've ran throughout this course or run docker run rattus

13
00:01:00,260 --> 00:01:03,370
like so and so that's going to reach out to the docker hub.

14
00:01:03,380 --> 00:01:07,940
It's going to pull down to read assistance and all start up a copy of read us on our local machine and

15
00:01:07,940 --> 00:01:09,050
boom just like that.

16
00:01:09,060 --> 00:01:10,280
There's our read a server.

17
00:01:10,400 --> 00:01:11,220
So that's it.

18
00:01:11,300 --> 00:01:16,840
That's the reticence instance we're going to use no customization to the docker image for it whatsoever.

19
00:01:16,870 --> 00:01:19,610
It's now that we have our talk or e-mail or read a server running.

20
00:01:19,730 --> 00:01:25,580
I'm going to open up a second terminal window and inside the second window or now try running docker

21
00:01:25,670 --> 00:01:27,760
run my image again.

22
00:01:28,250 --> 00:01:29,570
So say Dr. Ron.

23
00:01:29,630 --> 00:01:33,310
Stephen Grider slash visit's.

24
00:01:33,470 --> 00:01:36,860
Let's run that and you'll notice.

25
00:01:36,870 --> 00:01:40,070
Well it looks like we still have the same error message we had before.

26
00:01:40,170 --> 00:01:44,490
Even though we are now running a red S server inside of a separate container.

27
00:01:44,490 --> 00:01:45,770
So what's the problem.

28
00:01:46,080 --> 00:01:47,540
Well let's think about it for a second.

29
00:01:48,600 --> 00:01:50,820
Here's what's going on on your computer right now.

30
00:01:50,850 --> 00:01:57,420
You've got a node application in one container and the read us application in the separate dock or container.

31
00:01:57,420 --> 00:02:03,150
Now these two containers do not have any automatic communication between the two whatsoever.

32
00:02:03,150 --> 00:02:08,550
They are two absolutely isolated processes that don't have any communication.

33
00:02:08,610 --> 00:02:12,960
So in order to make sure that our node app has the ability to kind of reach out to the red a server

34
00:02:13,020 --> 00:02:18,270
and stored information or work with it in some fashion we need to set up some networking infrastructure

35
00:02:18,270 --> 00:02:19,860
between the two.

36
00:02:19,950 --> 00:02:24,630
You know when it comes to setting up some networking functionality between two separate containers we

37
00:02:24,630 --> 00:02:30,180
have for right now two options to look at here's are two options.

38
00:02:30,390 --> 00:02:33,930
We can either make use of the dockers Seelye that we've been making use of throughout this course so

39
00:02:33,930 --> 00:02:34,460
far.

40
00:02:34,480 --> 00:02:38,310
You know I'm talking about the docker command that we've been using at our terminal throughout this

41
00:02:38,310 --> 00:02:39,570
entire course.

42
00:02:39,690 --> 00:02:44,910
This built in Dr. Seelye has functionality tied to it that will allow us to set up a network between

43
00:02:44,940 --> 00:02:46,720
two separate containers.

44
00:02:46,990 --> 00:02:52,260
However there's a little issue with it and the issue is basically just that it's a real pain in the

45
00:02:52,260 --> 00:02:55,950
neck to do when you make use of Dr. Selye to set up some networking.

46
00:02:55,950 --> 00:03:01,320
It's going to involve a handful of different commands that we rewrite on every single time you start

47
00:03:01,320 --> 00:03:03,880
up your different containers.

48
00:03:04,380 --> 00:03:08,640
Now of course we could make some type of little script to run all that stuff for us but you know certainly

49
00:03:08,640 --> 00:03:12,300
it's gonna involve a lot of typing and a lot of thought on how we're going to set up all this networking

50
00:03:12,300 --> 00:03:13,260
stuff.

51
00:03:13,310 --> 00:03:18,480
I'm going to be honest with you I have just about never seen people in industry ever make an use of

52
00:03:18,480 --> 00:03:21,010
Dockers built in the dock or.

53
00:03:21,020 --> 00:03:25,560
Let me very clear here never making use of Dharker ceilings built in networking features to connect

54
00:03:25,560 --> 00:03:28,290
two containers together much more frequently.

55
00:03:28,290 --> 00:03:32,460
What you're going to see in what you and I are going to do inside this course is we're going to make

56
00:03:32,460 --> 00:03:42,160
use of a separate CSI tool called docker compose docker compose is a separate tool that gets installed

57
00:03:42,220 --> 00:03:43,310
along with docker.

58
00:03:43,390 --> 00:03:50,500
So if you right now flip back over to your terminal and run docker dash compose like so you should see

59
00:03:50,500 --> 00:03:56,450
some content appear on the screen and list out a series of different commands for you to run docker

60
00:03:56,470 --> 00:03:58,310
compose a separate Seelye.

61
00:03:58,330 --> 00:04:00,050
It's already installed on your machine.

62
00:04:00,310 --> 00:04:04,800
Now when you start introducing Dharker compose it's going to very quickly start getting confusing.

63
00:04:04,840 --> 00:04:09,590
What docker composed does and what Dr. Seelye does and what the relationship between the two is.

64
00:04:09,820 --> 00:04:15,100
It's the best thing I can tell you is that Ducker can pose really exists to keep you from having to

65
00:04:15,100 --> 00:04:21,130
write out a ton of different repetitive commands with the Dr. Selye Sarette throughout this course we've

66
00:04:21,130 --> 00:04:26,680
been running stuff like Daka run and Dharker attach an exec and we've been specifying ports and tags

67
00:04:26,680 --> 00:04:29,290
and all this stuff to us all the time.

68
00:04:29,550 --> 00:04:33,760
Now definitely as we learn this stuff you know we need to use Takhar Seelye and learn it.

69
00:04:33,760 --> 00:04:38,320
But at a certain point time you say OK you know I understand this Dr. Selye stuff and you get tired

70
00:04:38,320 --> 00:04:39,820
of writing out those commands.

71
00:04:39,940 --> 00:04:44,980
So one of the big purposes of Dharker compose is to just avoid having to write out all these really

72
00:04:45,010 --> 00:04:51,070
annoying tiny little options every time you want to start up a container The other big thing that Dr.

73
00:04:51,080 --> 00:04:55,850
compose is going to do for us is it's going to make it very easy and very straightforward to start up

74
00:04:55,940 --> 00:05:01,280
multiple docker containers at the same time and automatically connect them together with some form of

75
00:05:01,280 --> 00:05:06,060
networking and it's all going to happen behind the scenes for us quite automatically.

76
00:05:06,080 --> 00:05:10,640
So again as soon as you start seeing this terminology here of Dharker compose you know keeping all these

77
00:05:10,640 --> 00:05:13,570
docker terms straight in your head gets a little bit confusing.

78
00:05:13,610 --> 00:05:14,750
I to tell you this right now.

79
00:05:14,760 --> 00:05:16,370
I mean repeat it several times.

80
00:05:16,370 --> 00:05:23,060
The purpose of Dr. compose is to essentially function as Dr. Seelye but allow you to kind of issue multiple

81
00:05:23,060 --> 00:05:24,990
commands much more quickly.

82
00:05:25,010 --> 00:05:26,620
So let's take a quick break right here.

83
00:05:26,630 --> 00:05:30,080
We're going to come back the next section and we're going to get a little bit more familiar with Dr.

84
00:05:30,080 --> 00:05:31,660
compose and how it works.
