1
00:00:02,280 --> 00:00:04,440
And with that, that is really it

2
00:00:04,440 --> 00:00:08,253
for this module, this was a huge module.

3
00:00:09,560 --> 00:00:13,060
We started by understanding that Docker containers

4
00:00:13,060 --> 00:00:16,309
always work the same and can help us both locally

5
00:00:16,309 --> 00:00:20,310
on our machine during development, as well as in production.

6
00:00:20,310 --> 00:00:23,530
And throughout this module, you saw in great depth,

7
00:00:23,530 --> 00:00:26,670
how we can build images, and then launch containers

8
00:00:26,670 --> 00:00:29,990
based on these images locally on our machine.

9
00:00:29,990 --> 00:00:32,490
I guess you saw that through the entire course already,

10
00:00:32,490 --> 00:00:34,440
but also again in this module,

11
00:00:34,440 --> 00:00:36,220
but then especially in this module,

12
00:00:36,220 --> 00:00:39,350
you also saw how you can take these same containers

13
00:00:39,350 --> 00:00:42,690
and deploy them, for example to AWS,

14
00:00:42,690 --> 00:00:45,390
either by installing Docker on your own there,

15
00:00:45,390 --> 00:00:48,900
or by using a managed service like ECS,

16
00:00:48,900 --> 00:00:51,900
I highlighted a couple of important aspects

17
00:00:51,900 --> 00:00:53,390
you should keep in mind,

18
00:00:53,390 --> 00:00:57,380
like the fact that bind mounts are primarily a thing

19
00:00:57,380 --> 00:01:00,940
during development to mirror our life code

20
00:01:00,940 --> 00:01:02,350
into a running container.

21
00:01:02,350 --> 00:01:05,269
I showed you multistage builds and Docker files.

22
00:01:05,269 --> 00:01:08,500
For example, for applications that require a build step,

23
00:01:08,500 --> 00:01:12,000
like the React app, we had a look at in the last lectures.

24
00:01:12,000 --> 00:01:14,950
This is a powerful feature for ensuring

25
00:01:14,950 --> 00:01:18,280
that you can use Docker to not just to run code locally,

26
00:01:18,280 --> 00:01:20,550
but to also then deploy applications,

27
00:01:20,550 --> 00:01:23,300
which wouldn't work without an extra build step,

28
00:01:23,300 --> 00:01:25,980
we saw how we can deploy multiple containers

29
00:01:25,980 --> 00:01:28,950
within the same task, the same host, you could say,

30
00:01:28,950 --> 00:01:31,280
but also split across multiple hosts,

31
00:01:31,280 --> 00:01:34,470
and therefore running on different URLs.

32
00:01:34,470 --> 00:01:38,230
And I also talked about the trade-offs between having

33
00:01:38,230 --> 00:01:42,400
more control and responsibility and having less of both.

34
00:01:42,400 --> 00:01:44,200
And therefore throughout this module,

35
00:01:44,200 --> 00:01:47,520
you saw two main ways of deploying containers,

36
00:01:47,520 --> 00:01:50,570
you learned how you could connect to a remote machine,

37
00:01:50,570 --> 00:01:54,640
install Docker on it, and then use the Docker installation

38
00:01:54,640 --> 00:01:58,690
on that machine to pull images deployed to Docker Hub

39
00:01:58,690 --> 00:02:00,060
and run them on there.

40
00:02:00,060 --> 00:02:03,260
And you could also use Docker compose there, of course,

41
00:02:03,260 --> 00:02:05,670
it's your machine, you install the tools

42
00:02:05,670 --> 00:02:07,423
you can do whatever you want there.

43
00:02:08,320 --> 00:02:10,919
But because of that extra responsibility

44
00:02:10,919 --> 00:02:14,770
that comes with that, this might not be the best solution

45
00:02:14,770 --> 00:02:17,330
for all applications you might be building,

46
00:02:17,330 --> 00:02:20,030
because you can make errors there,

47
00:02:20,030 --> 00:02:22,760
you can build insecure setups.

48
00:02:22,760 --> 00:02:26,160
And therefore you might wanna go for a managed approach,

49
00:02:26,160 --> 00:02:29,030
for example, with AWS ECS.

50
00:02:29,030 --> 00:02:32,990
And hence, I also introduced you to that in great depth

51
00:02:32,990 --> 00:02:34,560
throughout this module.

52
00:02:34,560 --> 00:02:37,300
And you learned how ECS works

53
00:02:37,300 --> 00:02:39,100
that you work with tasks there,

54
00:02:39,100 --> 00:02:40,630
which contain your containers,

55
00:02:40,630 --> 00:02:44,500
and that you then start these tasks as services,

56
00:02:44,500 --> 00:02:47,880
you learned how you can have one or multiple containers

57
00:02:47,880 --> 00:02:50,720
in the same task or across multiple tasks.

58
00:02:50,720 --> 00:02:54,810
And we also had a look at our AWS resources,

59
00:02:54,810 --> 00:02:57,929
like the elastic file system service,

60
00:02:57,929 --> 00:03:00,760
to add a file system to our containers

61
00:03:00,760 --> 00:03:03,230
to then also add a volume to our containers

62
00:03:03,230 --> 00:03:05,800
to ensure that data is not lost

63
00:03:05,800 --> 00:03:09,563
if a container is redeployed or simply deleted.

64
00:03:10,400 --> 00:03:14,040
We also talked about the special role of databases.

65
00:03:14,040 --> 00:03:17,980
And that there, again, we have this trade-off,

66
00:03:17,980 --> 00:03:21,040
we can deploy our own database containers,

67
00:03:21,040 --> 00:03:23,240
but then we also have to manage them.

68
00:03:23,240 --> 00:03:26,620
And there are aspects like performance, scaling,

69
00:03:26,620 --> 00:03:30,170
availability, but also backups and security,

70
00:03:30,170 --> 00:03:32,140
which can be challenging.

71
00:03:32,140 --> 00:03:35,470
That's why I also recommended that you at least consider

72
00:03:35,470 --> 00:03:38,250
moving to a managed database service

73
00:03:38,250 --> 00:03:40,280
for this specific use case.

74
00:03:40,280 --> 00:03:43,650
And that therefore maybe don't use Docker for that,

75
00:03:43,650 --> 00:03:47,910
but instead, keep Docker focused on your application code

76
00:03:47,910 --> 00:03:50,500
on the node REST API in this example,

77
00:03:50,500 --> 00:03:53,050
on the React single page application,

78
00:03:53,050 --> 00:03:56,120
and move that database responsibility

79
00:03:56,120 --> 00:03:58,440
to some other hosting provider,

80
00:03:58,440 --> 00:04:02,180
which takes care of all the heavy lifting for you.

81
00:04:02,180 --> 00:04:04,230
And therefore, throughout this module,

82
00:04:04,230 --> 00:04:08,920
we did not just move from EC2, our own host machine

83
00:04:08,920 --> 00:04:10,720
with Docker installed on it.

84
00:04:10,720 --> 00:04:14,240
And this fully self managed approach to ECS.

85
00:04:14,240 --> 00:04:18,620
But we also managed from this ECS setup with node

86
00:04:18,620 --> 00:04:21,980
and MongoDB containers being deployed in one task

87
00:04:21,980 --> 00:04:26,260
to this set up where we also then added MongoDB Atlas,

88
00:04:26,260 --> 00:04:31,260
on to this setup, which turned out that it didn't work

89
00:04:31,310 --> 00:04:34,610
because we weren't able to launch two web servers

90
00:04:34,610 --> 00:04:36,250
in the same ECS task

91
00:04:36,250 --> 00:04:39,180
and therefore on the same machine in the end.

92
00:04:39,180 --> 00:04:42,910
So did we finally arrived at this setup

93
00:04:42,910 --> 00:04:46,580
where we had multiple containers running on different tasks,

94
00:04:46,580 --> 00:04:50,870
so different hosting machines, you could say on AWS.

95
00:04:50,870 --> 00:04:54,280
And we therefore had a setup where we finally were able

96
00:04:54,280 --> 00:04:56,800
to run everything the way we want it to run it

97
00:04:56,800 --> 00:04:59,863
now fully deployed to the cloud.

98
00:05:00,840 --> 00:05:02,960
Now there's always more you can learn,

99
00:05:02,960 --> 00:05:06,110
there are always things you could dive in deeper.

100
00:05:06,110 --> 00:05:08,580
Especially when it comes to AWS,

101
00:05:08,580 --> 00:05:11,260
we only scratched the surface here,

102
00:05:11,260 --> 00:05:14,560
because this is no AWS course.

103
00:05:14,560 --> 00:05:17,780
So there is some more you can configure here more settings

104
00:05:17,780 --> 00:05:21,220
you can find you and and there's way more you should learn

105
00:05:21,220 --> 00:05:24,630
about AWS and the services you're using there.

106
00:05:24,630 --> 00:05:28,710
If you plan on using this in your own apps in production,

107
00:05:28,710 --> 00:05:32,410
I really wanna emphasize that this was an example,

108
00:05:32,410 --> 00:05:36,040
I wanted to show you certain challenges you might be facing

109
00:05:36,040 --> 00:05:39,110
and how to think about managed services.

110
00:05:39,110 --> 00:05:42,050
Whereas this manual installation of Docker

111
00:05:42,050 --> 00:05:43,993
on a remote machine you own.

112
00:05:44,870 --> 00:05:49,070
The primary focus of this course was and is Docker,

113
00:05:49,070 --> 00:05:51,200
and you learned about many important features

114
00:05:51,200 --> 00:05:52,910
throughout this module.

115
00:05:52,910 --> 00:05:54,850
You again learned how containers

116
00:05:54,850 --> 00:05:57,350
really can run in different environments,

117
00:05:57,350 --> 00:06:00,180
and that they only need Docker for that.

118
00:06:00,180 --> 00:06:02,480
You learned about multistage builds,

119
00:06:02,480 --> 00:06:05,930
multistage Docker files a very useful feature,

120
00:06:05,930 --> 00:06:08,350
you saw environment variables in action.

121
00:06:08,350 --> 00:06:11,840
And in general, now, you should have a good understanding

122
00:06:11,840 --> 00:06:15,880
of Docker but also of how to use Docker locally

123
00:06:15,880 --> 00:06:18,080
with Docker compose for example,

124
00:06:18,080 --> 00:06:21,490
and what it means to deploy Docker to a remote host.

125
00:06:21,490 --> 00:06:24,740
And of course, if you decide to use Docker only locally

126
00:06:24,740 --> 00:06:26,560
on your machine during development,

127
00:06:26,560 --> 00:06:29,330
that would be totally fine as well.

128
00:06:29,330 --> 00:06:31,880
I just want to give you the big picture,

129
00:06:31,880 --> 00:06:34,100
I want to give you the full tool set

130
00:06:34,100 --> 00:06:37,940
so that you can use Docker containers wherever you want,

131
00:06:37,940 --> 00:06:41,453
on your machine, on a remote machine, everywhere.

