1
00:00:00,840 --> 00:00:05,340
The running theme that we have seen with Dharker compose is that it makes it a lot easier to work with

2
00:00:05,340 --> 00:00:07,680
multiple containers at the same time.

3
00:00:07,800 --> 00:00:11,760
In this section we're going to take a look at two different commands that we had previously used with

4
00:00:11,840 --> 00:00:16,200
darker Seelye and get a sense of how to run them with darker compose instead.

5
00:00:16,530 --> 00:00:18,250
So the two commands we're going to look at.

6
00:00:18,300 --> 00:00:20,220
Well just the first one for right now.

7
00:00:20,250 --> 00:00:22,260
We'll move on to the second one just a moment.

8
00:00:22,290 --> 00:00:29,370
I want you to recall that in the past we executed a or created a container by running docker run Dashti

9
00:00:29,730 --> 00:00:32,860
and then the name of an image like say rattus.

10
00:00:32,910 --> 00:00:38,280
This started up a new container but it executed in the background so we could continue running commands

11
00:00:38,490 --> 00:00:40,930
in this terminal window if we wanted to.

12
00:00:41,160 --> 00:00:46,380
We could then get a print out of all of our running containers with Dr. p.s..

13
00:00:46,470 --> 00:00:52,920
So there's the container I just created and I could then stop that container by copying the ID and executing

14
00:00:53,250 --> 00:01:00,420
docker stop and pasting the ID making kind of imagine that when we start using docker compose and we're

15
00:01:00,420 --> 00:01:06,300
working with multiple images or multiple containers at the same time it would really be a pain to have

16
00:01:06,300 --> 00:01:10,940
to run Dockers stop with each different ID for each container we started.

17
00:01:11,370 --> 00:01:16,650
So Dr. kapos we can automatically start up multiple containers in the background at the same time and

18
00:01:16,650 --> 00:01:20,370
then close them all at the same time with one single command.

19
00:01:20,700 --> 00:01:27,210
So here's how we do it to start up a group of containers in the background using that Dashti flag before

20
00:01:27,210 --> 00:01:32,900
like we do with Dr. Seelye we can run or compose up and then Dashti on the very end.

21
00:01:33,420 --> 00:01:39,240
We can then stop all of our running containers with Doc or compose down an easy way to remember down

22
00:01:39,260 --> 00:01:43,840
right here is that hey doc it blows up the opposite of going up is going down.

23
00:01:44,710 --> 00:01:46,700
So let's try this out.

24
00:01:46,960 --> 00:01:53,690
Still inside of my visits directory all around doc or compose up Dashti that's going to start up both

25
00:01:53,690 --> 00:01:57,990
to my containers in the background so I can continue running other commands here.

26
00:01:58,690 --> 00:02:04,810
I can do a docker P.S. that'll show our two running containers and then to start both them at the same

27
00:02:04,810 --> 00:02:14,020
time we can do a docker compose down like so and when I run that it's going to stop and then remove

28
00:02:14,200 --> 00:02:15,980
the two containers we had created.

29
00:02:16,240 --> 00:02:19,890
So if I do another Dr. P.S. No nothing here anymore.

30
00:02:20,280 --> 00:02:20,560
All right.

31
00:02:20,560 --> 00:02:21,730
So that's pretty much it.

32
00:02:21,760 --> 00:02:26,590
Again there's a lot of commands from the Dr. Seelye worlds that have kind of a one to one translation

33
00:02:26,620 --> 00:02:28,460
over to Dr. compose.

34
00:02:28,660 --> 00:02:32,470
So let's take a quick pause right here and we'll continue looking at a couple other commands in the

35
00:02:32,470 --> 00:02:33,280
next section.
