1
00:00:02,429 --> 00:00:03,980
<v Instructor>This is Docker Compose</v>

2
00:00:03,980 --> 00:00:06,560
and the docker-compose.yaml file.

3
00:00:06,560 --> 00:00:08,870
Now I did mention this complete reference

4
00:00:08,870 --> 00:00:10,760
with all the potential options,

5
00:00:10,760 --> 00:00:14,580
but it showed you all important options in this module.

6
00:00:14,580 --> 00:00:17,130
So all the options you will use all the time,

7
00:00:17,130 --> 00:00:19,660
I covered them in this module.

8
00:00:19,660 --> 00:00:21,010
Now with Docker Compose,

9
00:00:21,010 --> 00:00:23,950
it's super easy to build complex projects

10
00:00:23,950 --> 00:00:26,070
consisting of multiple containers

11
00:00:26,070 --> 00:00:28,840
that should be able to interact with each other.

12
00:00:28,840 --> 00:00:30,710
You can also use Docker Compose

13
00:00:30,710 --> 00:00:33,080
if you have just one container, though.

14
00:00:33,080 --> 00:00:36,380
For example, because you like the simplicity

15
00:00:36,380 --> 00:00:38,350
of specifying bind mounts,

16
00:00:38,350 --> 00:00:42,570
not having to use this long path, that is an advantage.

17
00:00:42,570 --> 00:00:44,920
And, even if it's not the bind mount,

18
00:00:44,920 --> 00:00:47,310
having one conflict file where you

19
00:00:47,310 --> 00:00:50,820
can conveniently tweak your container configuration

20
00:00:50,820 --> 00:00:54,910
might be more convenient than having to type long commands

21
00:00:54,910 --> 00:00:56,863
into command prompt or terminal.

22
00:00:57,970 --> 00:01:01,070
That's why Docker Compose is also often used

23
00:01:01,070 --> 00:01:03,260
for single container setups

24
00:01:03,260 --> 00:01:06,820
because you can specify your launch configuration

25
00:01:06,820 --> 00:01:08,930
in such a configuration file,

26
00:01:08,930 --> 00:01:11,730
which is simply easier to maintain and manage

27
00:01:11,730 --> 00:01:13,850
than commands like this.

28
00:01:13,850 --> 00:01:17,070
So Docker Compose is a tool that we'll now see

29
00:01:17,070 --> 00:01:20,800
for the rest of this course because it is so powerful.

30
00:01:20,800 --> 00:01:23,830
But I also want you to understand and keep in mind

31
00:01:23,830 --> 00:01:27,610
that Docker Compose does not replace Docker files.

32
00:01:27,610 --> 00:01:29,680
Instead, it works together with them

33
00:01:29,680 --> 00:01:32,620
with this build option and that it also

34
00:01:32,620 --> 00:01:36,900
only partially replaces docker run and docker build.

35
00:01:36,900 --> 00:01:39,910
Yes, you don't execute these commands anymore,

36
00:01:39,910 --> 00:01:40,900
but under the hood,

37
00:01:40,900 --> 00:01:43,960
they are of course executed by Docker Compose.

38
00:01:43,960 --> 00:01:45,960
So it's not a brand new tool.

39
00:01:45,960 --> 00:01:48,780
It's still part of the Docker ecosystem.

40
00:01:48,780 --> 00:01:50,870
It just makes working with Docker

41
00:01:50,870 --> 00:01:54,643
and complex Docker container configurations easier.

42
00:01:55,540 --> 00:01:57,120
In addition, you can, of course,

43
00:01:57,120 --> 00:01:59,670
still use other Docker commands.

44
00:01:59,670 --> 00:02:03,020
For example, you can still list all volumes

45
00:02:03,020 --> 00:02:05,800
with docker volume ls if you wanna do that,

46
00:02:05,800 --> 00:02:08,420
and here you will also see all the volumes

47
00:02:08,420 --> 00:02:11,260
that were created by Docker Compose.

48
00:02:11,260 --> 00:02:14,030
All the anonymous volumes, all the named volumes,

49
00:02:14,030 --> 00:02:16,033
you can see all of that here.

50
00:02:17,380 --> 00:02:19,480
It's not an either/or decision.

51
00:02:19,480 --> 00:02:22,720
It's really just an extra tool in your tool belt,

52
00:02:22,720 --> 00:02:25,680
which can make working with complex applications

53
00:02:25,680 --> 00:02:27,523
and project setups easier.

