1
00:00:02,210 --> 00:00:03,380
So as mentioned,

2
00:00:03,380 --> 00:00:05,500
we don't just have containers,

3
00:00:05,500 --> 00:00:09,940
we also have images, when working with Docker.

4
00:00:09,940 --> 00:00:11,730
Now, what is the difference,

5
00:00:11,730 --> 00:00:13,900
and why do we need both?

6
00:00:13,900 --> 00:00:16,000
We already heard about Containers

7
00:00:16,000 --> 00:00:18,240
in the first course module.

8
00:00:18,240 --> 00:00:22,720
You learned that containers in the end are small packages,

9
00:00:22,720 --> 00:00:26,250
you could say, that contain both your application,

10
00:00:26,250 --> 00:00:28,450
your website, your Node server,

11
00:00:28,450 --> 00:00:31,010
whatever it is, and also,

12
00:00:31,010 --> 00:00:34,670
and that's important, the entire environment

13
00:00:34,670 --> 00:00:36,800
to run that application.

14
00:00:36,800 --> 00:00:40,580
So a container is there's a running unit of software.

15
00:00:40,580 --> 00:00:43,033
It is the thing which you run in the end.

16
00:00:44,260 --> 00:00:46,060
But when working with Docker,

17
00:00:46,060 --> 00:00:49,360
we also need dissolver concept called Images,

18
00:00:49,360 --> 00:00:52,580
because images will be the templates,

19
00:00:52,580 --> 00:00:55,083
the blueprints for containers,

20
00:00:55,960 --> 00:00:58,470
it's actually the image,

21
00:00:58,470 --> 00:01:00,460
which will contain the code

22
00:01:00,460 --> 00:01:03,840
and the required tools to execute the code.

23
00:01:03,840 --> 00:01:08,840
And it's the container that then runs and executes the code.

24
00:01:09,010 --> 00:01:13,330
And we have this split, this separation here,

25
00:01:13,330 --> 00:01:15,860
so that we can create an image

26
00:01:15,860 --> 00:01:20,060
with all these setup instructions and all our code once,

27
00:01:20,060 --> 00:01:22,160
but then we can use this image

28
00:01:22,160 --> 00:01:26,170
to create multiple containers based on that image.

29
00:01:26,170 --> 00:01:27,530
So that, for example,

30
00:01:27,530 --> 00:01:31,550
if we talk about a Node.js web server application,

31
00:01:31,550 --> 00:01:33,160
we can define it once,

32
00:01:33,160 --> 00:01:36,600
but run it multiple times on different machines,

33
00:01:36,600 --> 00:01:38,510
and different servers.

34
00:01:38,510 --> 00:01:42,140
And the image is that sharable package

35
00:01:42,140 --> 00:01:44,720
with all the setup instructions and all the code.

36
00:01:44,720 --> 00:01:49,330
And the container will be the concrete running instance

37
00:01:49,330 --> 00:01:50,780
off such an image.

38
00:01:50,780 --> 00:01:54,490
So we run containers, which are based on images.

39
00:01:54,490 --> 00:01:58,450
That is the core fundamental concept,

40
00:01:58,450 --> 00:02:00,370
Docker is all about in the end.

41
00:02:00,370 --> 00:02:02,290
Images and containers,

42
00:02:02,290 --> 00:02:04,410
where images are the blueprints,

43
00:02:04,410 --> 00:02:06,470
the templates which contained the code

44
00:02:06,470 --> 00:02:09,039
and the application, and containers,

45
00:02:09,039 --> 00:02:12,240
are then the running application.

46
00:02:12,240 --> 00:02:15,700
And this will become clearer throughout this module,

47
00:02:15,700 --> 00:02:18,840
once we start working with images and containers,

48
00:02:18,840 --> 00:02:22,520
and actually let's start working with that, right now.

49
00:02:22,520 --> 00:02:25,110
Let's see how we can work with images,

50
00:02:25,110 --> 00:02:27,713
and containers when using Docker.

