1
00:00:02,220 --> 00:00:05,770
That's it for this key module.

2
00:00:05,770 --> 00:00:08,710
We learned a lot in this course module.

3
00:00:08,710 --> 00:00:11,710
We learned a lot about the core fundamentals

4
00:00:11,710 --> 00:00:15,200
you have to know when working with Docker.

5
00:00:15,200 --> 00:00:17,370
One of the most important takeaways

6
00:00:17,370 --> 00:00:21,450
and kind of the heart of Docker is that Docker

7
00:00:21,450 --> 00:00:24,740
is all about images and containers.

8
00:00:24,740 --> 00:00:28,450
But in this module you learned what this means.

9
00:00:28,450 --> 00:00:30,860
It means that images are the templates,

10
00:00:30,860 --> 00:00:34,660
the blueprints for containers and you can run

11
00:00:34,660 --> 00:00:37,040
multiple containers which are based

12
00:00:37,040 --> 00:00:40,650
on one and the same image and you can have multiple images

13
00:00:40,650 --> 00:00:42,890
for different containers as well.

14
00:00:42,890 --> 00:00:46,470
And you learned that these containers would then be run

15
00:00:46,470 --> 00:00:51,470
in an efficient way as a tiny layer on top of your image

16
00:00:51,850 --> 00:00:54,040
using the code and the environment

17
00:00:54,040 --> 00:00:57,430
which is stored in the image, not in the container,

18
00:00:57,430 --> 00:01:00,150
but then actually running the application

19
00:01:00,150 --> 00:01:03,700
which is set up and configured with help of the image.

20
00:01:03,700 --> 00:01:07,460
That's how work is split between image and container

21
00:01:07,460 --> 00:01:11,520
and how multiple containers running the same application

22
00:01:11,520 --> 00:01:14,070
can be executed in isolation

23
00:01:14,070 --> 00:01:18,020
with a very low footprint on your system.

24
00:01:18,020 --> 00:01:22,580
Now images are either downloaded with docker pull

25
00:01:22,580 --> 00:01:25,150
or created with help of a Dockerfile

26
00:01:25,150 --> 00:01:26,530
if you build your own image.

27
00:01:26,530 --> 00:01:31,220
A Dockerfile and docker build builds a new image.

28
00:01:31,220 --> 00:01:34,800
And in this module we built a couple of Dockerfiles

29
00:01:34,800 --> 00:01:37,900
and the structure's always very similar.

30
00:01:37,900 --> 00:01:42,010
Often we use a base image, like in this case Node

31
00:01:42,010 --> 00:01:43,650
which then in turn might use

32
00:01:43,650 --> 00:01:46,220
even another base image internally.

33
00:01:46,220 --> 00:01:50,610
And then we have our instructions that configure this image,

34
00:01:50,610 --> 00:01:53,780
that control what is copied into the image

35
00:01:53,780 --> 00:01:56,610
and how the environment should be set up.

36
00:01:56,610 --> 00:01:58,990
And last but not least we have that command

37
00:01:58,990 --> 00:02:02,070
which should be executed whenever we run

38
00:02:02,070 --> 00:02:04,640
a container based on that image.

39
00:02:04,640 --> 00:02:06,220
And all these instructions

40
00:02:06,220 --> 00:02:10,280
which you put into your Dockerfile create layers.

41
00:02:10,280 --> 00:02:14,070
Images as you learned are made up of multiple layers

42
00:02:14,070 --> 00:02:19,070
and this layer concept exists to optimize build speed

43
00:02:19,280 --> 00:02:22,830
since Docker is able to cache layers and doesn't need

44
00:02:22,830 --> 00:02:26,640
to rerun them if nothing changed about that step

45
00:02:26,640 --> 00:02:29,470
and it also helps with reusability.

46
00:02:29,470 --> 00:02:32,170
For example, if you share an image

47
00:02:32,170 --> 00:02:34,020
which is based on Node,

48
00:02:34,020 --> 00:02:36,120
then Docker is able to find out

49
00:02:36,120 --> 00:02:38,900
that this Node image already exists,

50
00:02:38,900 --> 00:02:42,370
maybe didn't change and therefore it's able to efficiently

51
00:02:42,370 --> 00:02:44,270
link this to your image.

52
00:02:44,270 --> 00:02:48,403
For example, if you share your Docker image on Docker Hub.

53
00:02:49,400 --> 00:02:51,200
So that's images.

54
00:02:51,200 --> 00:02:54,520
Containers of course are why we're all here though.

55
00:02:54,520 --> 00:02:57,030
We run containers based on images

56
00:02:57,030 --> 00:02:59,190
with the docker run command

57
00:02:59,190 --> 00:03:01,430
and throughout this module you saw

58
00:03:01,430 --> 00:03:04,060
that there are a lot of options and flags

59
00:03:04,060 --> 00:03:07,510
which can be set on the docker run command.

60
00:03:07,510 --> 00:03:10,760
You can make the container interactive if it needs it

61
00:03:10,760 --> 00:03:13,500
to allow the user or yourself

62
00:03:13,500 --> 00:03:16,340
to enter something into the running application.

63
00:03:16,340 --> 00:03:17,780
You can assign a name.

64
00:03:17,780 --> 00:03:19,360
You can ensure that the container

65
00:03:19,360 --> 00:03:22,530
is automatically removed if it stops.

66
00:03:22,530 --> 00:03:24,800
And there are many other options,

67
00:03:24,800 --> 00:03:27,070
some which you need often

68
00:03:27,070 --> 00:03:30,170
and a lot of options which you rarely need.

69
00:03:30,170 --> 00:03:31,930
We're going to see more options

70
00:03:31,930 --> 00:03:34,080
throughout this course of course.

71
00:03:34,080 --> 00:03:36,260
Now running containers is one thing,

72
00:03:36,260 --> 00:03:40,010
but you got various commands to manage containers as well.

73
00:03:40,010 --> 00:03:42,110
You can list and remove containers

74
00:03:42,110 --> 00:03:43,600
with the respective commands

75
00:03:43,600 --> 00:03:47,130
and you can stop and start them if you want to.

76
00:03:47,130 --> 00:03:49,650
And the same is true for images.

77
00:03:49,650 --> 00:03:52,930
They can also be listed or removed if you need to

78
00:03:52,930 --> 00:03:55,740
and you can share them with docker push and pull.

79
00:03:55,740 --> 00:03:57,620
For example with Docker Hub

80
00:03:57,620 --> 00:04:01,150
as you saw in the last lectures of this module.

81
00:04:01,150 --> 00:04:03,810
Now at this point, all the core concepts

82
00:04:03,810 --> 00:04:06,570
discussed in this module should be clear.

83
00:04:06,570 --> 00:04:10,530
If they're not, definitely revisit the lectures

84
00:04:10,530 --> 00:04:13,420
where I talk about them, where I explain them

85
00:04:13,420 --> 00:04:17,660
so that we all are on the same page after this module.

86
00:04:17,660 --> 00:04:20,519
Also make sure you have a look at that assignment

87
00:04:20,519 --> 00:04:22,250
which you find in this module.

88
00:04:22,250 --> 00:04:23,580
It's a great practice

89
00:04:23,580 --> 00:04:27,020
and I recommend that you take advantage of that.

90
00:04:27,020 --> 00:04:30,250
Attached to the last lecture of this module

91
00:04:30,250 --> 00:04:32,290
so the lecture after this one,

92
00:04:32,290 --> 00:04:36,790
you find a cheat sheet with the key commands and concepts

93
00:04:36,790 --> 00:04:38,840
you should know after this module

94
00:04:38,840 --> 00:04:42,440
so that can be great as well as an additional help

95
00:04:42,440 --> 00:04:45,590
to also keep all these concepts in mind

96
00:04:45,590 --> 00:04:49,250
and have a resource for quickly looking up certain concepts.

97
00:04:49,250 --> 00:04:52,600
So definitely also take advantage of that cheat sheet

98
00:04:52,600 --> 00:04:54,630
attached to the next lecture.

99
00:04:54,630 --> 00:04:56,330
And with that, let's move on

100
00:04:56,330 --> 00:04:58,653
and let's dig deeper into Docker.

