WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.400 --> 00:00:10.500
In this video you're going to install and run a Maria

1
00:00:10.500 --> 00:00:13.500
 database in a container on your Linux instance.

2
00:00:14.200 --> 00:00:17.900
Plan is to learn how to run Maria DB inside

3
00:00:17.900 --> 00:00:20.600
 a container. If you're not familiar with Marie to

4
00:00:20.600 --> 00:00:23.300
 be it's an open source database that was forked for my sequel.

5
00:00:24.200 --> 00:00:28.000
You will install the docker package to manage this container. Then you

6
00:00:27.200 --> 00:00:30.900
 will run a Maria database instance using

7
00:00:30.900 --> 00:00:32.400
 the docker command line application.

8
00:00:33.300 --> 00:00:36.300
Finally, you will test database access to the

9
00:00:36.300 --> 00:00:39.900
 Maria to be container using the Maria DB client. Okay, let's

10
00:00:39.900 --> 00:00:40.300
 get started.

11
00:00:41.300 --> 00:00:42.800
Here we are back in the terminal once again.

12
00:00:43.500 --> 00:00:46.200
So most workloads have now moved over to

13
00:00:46.200 --> 00:00:47.800
 Containers like we've talked about before.

14
00:00:48.700 --> 00:00:51.400
So having a good understanding of how to run an application

15
00:00:51.400 --> 00:00:54.600
 and manage containers is really pivotal to

16
00:00:54.600 --> 00:00:55.700
 today's jobs.

17
00:00:57.100 --> 00:01:00.600
So I have chosen for our example Maria database

18
00:01:00.600 --> 00:01:03.200
 for us to run as a container on our

19
00:01:03.200 --> 00:01:07.100
 ec2 instance. So like I said in the intro if

20
00:01:06.100 --> 00:01:09.200
 you're not familiar with Reed to be it's a popular

21
00:01:09.200 --> 00:01:12.200
 relational database. It's open source, and it's a fork from the original

22
00:01:12.200 --> 00:01:15.100
 my sequel database which was purchased by

23
00:01:15.100 --> 00:01:18.800
 Oracle and is now becoming more and

24
00:01:18.800 --> 00:01:20.500
 more prior proprietary.

25
00:01:21.700 --> 00:01:25.200
So but before we can actually set this

26
00:01:24.200 --> 00:01:27.100
 up and run Marie to be we need a way

27
00:01:27.100 --> 00:01:27.900
 to manage the container.

28
00:01:28.600 --> 00:01:31.300
So this is where a Docker comes in and if you

29
00:01:31.300 --> 00:01:34.200
 if you haven't heard a doc or maybe have Dockers just

30
00:01:34.200 --> 00:01:37.200
 a sweet of tools that makes managing containers easy and seamless across

31
00:01:37.200 --> 00:01:38.200
 any host.

32
00:01:39.100 --> 00:01:42.700
So the two main parts that we're gonna use in the docker package

33
00:01:42.700 --> 00:01:45.100
 is the docker server and the docker CLI.

34
00:01:45.700 --> 00:01:48.300
So to install the docker package, we'll use

35
00:01:48.300 --> 00:01:51.500
 sudo again and we'll use our yum package manager. So

36
00:01:51.500 --> 00:01:53.900
 let's get started with that. So we're gonna install.

37
00:01:55.500 --> 00:01:56.800
Docker package

38
00:01:57.400 --> 00:01:59.900
And we can just do sudo yum install docker.

39
00:02:01.600 --> 00:02:04.200
It is gonna ask us are we sure we want to do

40
00:02:04.200 --> 00:02:08.100
 this we are so we'll hit yes, and it'll install

41
00:02:07.100 --> 00:02:10.000
 the docker package for us.

42
00:02:11.500 --> 00:02:13.200
Okay, let me clear the screen here.

43
00:02:14.400 --> 00:02:17.100
So since we are not a part of the docker group, you will need

44
00:02:17.100 --> 00:02:20.100
 to either prefix all your Docker commands

45
00:02:20.100 --> 00:02:23.400
 with sudo or to get around this we can use

46
00:02:23.400 --> 00:02:26.700
 the user mod command, which we learned about when we were discussing

47
00:02:26.700 --> 00:02:29.500
 users to add the ec2 user to

48
00:02:29.500 --> 00:02:31.500
 the docker group. And so let's do that.

49
00:02:32.400 --> 00:02:35.600
So we're going to need elevated privileges again. And so

50
00:02:35.600 --> 00:02:38.200
 you're gonna use the user mod command and this time we're

51
00:02:38.200 --> 00:02:41.400
 going to use a dash a and a Dash G flag. So

52
00:02:41.400 --> 00:02:43.100
 the dash a means append.

53
00:02:43.600 --> 00:02:46.200
Whatever group we want to to the user. So whatever

54
00:02:46.200 --> 00:02:50.100
 groups this user already has just appended to this and the

55
00:02:49.100 --> 00:02:52.300
 g is the group name, of course, so we're gonna

56
00:02:52.300 --> 00:02:53.000
 say docker.

57
00:02:53.800 --> 00:02:56.200
And we're gonna say ec2 users. So

58
00:02:56.200 --> 00:02:58.600
 that's the user we're logged in that so we're going to do this.

59
00:02:59.700 --> 00:03:02.600
And of course if we do ID like which

60
00:03:02.600 --> 00:03:03.600
 we learned we learned about.

61
00:03:05.800 --> 00:03:06.100
ec2 user

62
00:03:06.900 --> 00:03:09.300
We could see now here. We are a part

63
00:03:09.300 --> 00:03:13.000
 of the docker group now. Unfortunately, this does

64
00:03:12.100 --> 00:03:15.400
 not take effect until we would log out log back in

65
00:03:15.400 --> 00:03:16.100
 but

66
00:03:17.200 --> 00:03:20.500
As with most stuff in Lennox, there is a shortcut we can use and

67
00:03:20.500 --> 00:03:23.600
 this is called the new group command. And basically

68
00:03:23.600 --> 00:03:26.300
 this will simulate the finalization of the user as

69
00:03:26.300 --> 00:03:27.700
 it being a part of the docker group. So

70
00:03:30.200 --> 00:03:33.300
in your terminal you can type oops and I need

71
00:03:33.300 --> 00:03:36.300
 to spell it correctly first, but new grp and then

72
00:03:37.400 --> 00:03:41.000
the group that we want to finalize

73
00:03:41.700 --> 00:03:44.500
Okay, so now we can run any

74
00:03:44.500 --> 00:03:47.100
 Docker command without having to prefix it with sudo and

75
00:03:47.100 --> 00:03:47.700
 so to test that.

76
00:03:48.400 --> 00:03:51.400
We should run Docker PS now here you

77
00:03:51.400 --> 00:03:54.400
 notice we have this error and it's saying it gives us a nice

78
00:03:54.400 --> 00:03:57.800
 area is the saw is the docker Damon running. Well, it

79
00:03:57.800 --> 00:04:00.700
 isn't and some packages by default

80
00:04:00.700 --> 00:04:02.800
 will not start the unit file.

81
00:04:03.600 --> 00:04:06.400
For whatever reasons and Docker in

82
00:04:06.400 --> 00:04:09.400
 this case is one of them so but we already know how to fix this. It's actually

83
00:04:09.400 --> 00:04:13.400
 very simple. We're gonna use this system CTL command.

84
00:04:14.900 --> 00:04:17.200
And we're gonna actually start docker.

85
00:04:18.100 --> 00:04:20.200
And we're just going to use the darker dot service.

86
00:04:21.100 --> 00:04:24.400
Okay, so that should be up and running one way

87
00:04:24.400 --> 00:04:27.600
 to test. This is run Docker PS again, and we get

88
00:04:27.600 --> 00:04:30.400
 a good return. Now as you

89
00:04:30.400 --> 00:04:33.200
 guys the headers of these these columns and there's nothing

90
00:04:33.200 --> 00:04:36.100
 running. That's because we haven't running anything yet. And so let's go

91
00:04:36.100 --> 00:04:37.500
 ahead and start that next.

92
00:04:38.300 --> 00:04:41.300
Okay. So since containers can't run without

93
00:04:41.300 --> 00:04:44.200
 a container image. We need to go get one and one way

94
00:04:44.200 --> 00:04:47.100
 we could do that is we can use the docker pull command. And

95
00:04:47.100 --> 00:04:50.700
 so that what the docker pull command will do was Google will jump out to Docker

96
00:04:50.700 --> 00:04:53.600
 Hub, which is kind of like a repository but for container

97
00:04:53.600 --> 00:04:56.400
 images and we're gonna just ask it for

98
00:04:56.400 --> 00:04:58.300
 the Maria DB image.

99
00:04:59.300 --> 00:05:02.200
And we want the latest so we'll give

100
00:05:02.200 --> 00:05:05.600
 it a colon latest and that just says grab me the latest the the

101
00:05:05.600 --> 00:05:08.700
 most newest version of the Maria DB container,

102
00:05:08.700 --> 00:05:09.100
 which you have.

103
00:05:09.800 --> 00:05:10.400
and so

104
00:05:11.700 --> 00:05:15.000
there we go. We went ahead and pulled it. It says

105
00:05:14.100 --> 00:05:17.200
 it's up to date and that's because

106
00:05:17.200 --> 00:05:20.400
 I pulled it earlier just to make sure there wasn't any errors when

107
00:05:20.400 --> 00:05:23.200
 I was before recording this video. But what you will see

108
00:05:23.200 --> 00:05:26.700
 is it'll actually start pulling it down and you

109
00:05:26.700 --> 00:05:29.200
 will see that the progress of each layer that

110
00:05:29.200 --> 00:05:32.700
 it pulls down. So we already have the Maria container Maria

111
00:05:32.700 --> 00:05:35.600
 database container image on disk so from

112
00:05:35.600 --> 00:05:35.700
 here.

113
00:05:36.900 --> 00:05:39.100
The next thing we want to do is we want to get ready to go

114
00:05:39.100 --> 00:05:42.300
 ahead and run this container. So Docker has

115
00:05:42.300 --> 00:05:45.200
 a subcommand called run and it takes a few

116
00:05:45.200 --> 00:05:48.600
 arguments like the name of the container a port environment

117
00:05:48.600 --> 00:05:51.000
 variables and the actual container image you want to use

118
00:05:52.300 --> 00:05:56.100
So for us we're gonna name this container Maria DB.

119
00:05:55.100 --> 00:05:58.300
 So it's just easy for us to find and run other

120
00:05:58.300 --> 00:06:02.100
 commands against Maria DB by default uses

121
00:06:01.100 --> 00:06:05.100
 the TCP Port of 3306 and

122
00:06:04.100 --> 00:06:06.100
 we're going to use that as well.

123
00:06:06.900 --> 00:06:09.800
So we're gonna open that on the host

124
00:06:09.800 --> 00:06:12.300
 and obviously it's already running when

125
00:06:12.300 --> 00:06:15.200
 it's running in the on the databases running. It's gonna

126
00:06:15.200 --> 00:06:18.500
 be listening on 3306 inside the container but we're gonna

127
00:06:18.500 --> 00:06:22.000
 do is we're gonna do is like basically a port forward. So we're

128
00:06:21.100 --> 00:06:24.300
 gonna when we when we spin this up we will

129
00:06:24.300 --> 00:06:27.400
 have it listening on the ec2 host on 3306 and

130
00:06:27.400 --> 00:06:30.700
 any connections that hit that 3306 on the host. Well

131
00:06:30.700 --> 00:06:33.400
 actually be routed to the database inside the container.

132
00:06:33.400 --> 00:06:36.200
 This will make a little more sense once you see it run on the

133
00:06:36.200 --> 00:06:36.300
 command.

134
00:06:37.300 --> 00:06:40.200
Next we're also in this we we need to set

135
00:06:40.200 --> 00:06:43.500
 some environment variables. So Maria database has like a root

136
00:06:43.500 --> 00:06:46.400
 user a root password a database user

137
00:06:46.400 --> 00:06:49.200
 and a database password setup as well. And we're just going

138
00:06:49.200 --> 00:06:52.300
 to pass in obviously just throw away fake ones here.

139
00:06:52.300 --> 00:06:55.200
 Okay, so it's quite of a long of a command. So

140
00:06:55.200 --> 00:06:58.200
 what I'm gonna do is I'm gonna paste the command and then we're gonna go over each section.

141
00:06:59.700 --> 00:06:59.800
All right.

142
00:07:00.800 --> 00:07:03.100
So here we are. Here's the command.

143
00:07:04.200 --> 00:07:07.600
So we can see here. We start with Docker we run. So this

144
00:07:07.600 --> 00:07:10.400
 detached command means like basically run

145
00:07:10.400 --> 00:07:13.100
 this container in the background. If not, if I didn't have

146
00:07:13.100 --> 00:07:16.200
 the detach it or run on the foreground and I wouldn't be at my

147
00:07:16.200 --> 00:07:17.900
 it would take over my current shell.

148
00:07:18.300 --> 00:07:21.400
Here we do the name of the container and this

149
00:07:21.400 --> 00:07:24.500
 is gonna be read Marie DB and so here's the environment variables. I'll

150
00:07:24.500 --> 00:07:27.400
 say with setting so we're gonna create a Maria deep database

151
00:07:27.400 --> 00:07:29.000
 user called lab Dash user.

152
00:07:29.500 --> 00:07:32.600
And then we're going to set a password for that lab user

153
00:07:32.600 --> 00:07:33.900
 just called Lab secret password.

154
00:07:34.800 --> 00:07:38.200
And then we're gonna set the Maria DB root

155
00:07:37.200 --> 00:07:40.200
 password to just lab root password.

156
00:07:41.100 --> 00:07:44.300
I know not not very not very clever. And then

157
00:07:44.300 --> 00:07:47.300
 here's the port we were talking about. So this says on the

158
00:07:47.300 --> 00:07:50.300
 host open port 3306 on our host.

159
00:07:51.400 --> 00:07:53.200
And then send it to the container.

160
00:07:54.200 --> 00:07:55.700
on Port 3306

161
00:07:56.400 --> 00:07:58.900
and then here on the final on the last.

162
00:07:59.800 --> 00:08:03.000
Argument here. This is just the name of the image and

163
00:08:02.600 --> 00:08:05.200
 the name of the tag where the

164
00:08:05.200 --> 00:08:09.100
 latest in this case. All right, so I'm gonna go ahead run return and

165
00:08:08.100 --> 00:08:11.200
 there you can see it's spit out

166
00:08:11.200 --> 00:08:14.600
 this hash. And so every container that gets run inside Docker

167
00:08:14.600 --> 00:08:17.200
 is a unique ID and this ID is gonna

168
00:08:17.200 --> 00:08:20.500
 come in handy later on also we can use it in conjunction

169
00:08:20.500 --> 00:08:23.100
 with the name. So, okay. So the one thing we could do

170
00:08:23.100 --> 00:08:26.100
 is now let's let's clear the screen. Actually, I'll leave the screen

171
00:08:26.100 --> 00:08:28.400
 at one more time in case because that is a long command.

172
00:08:29.700 --> 00:08:32.500
And we can run Docker PS. And so now what

173
00:08:32.500 --> 00:08:36.000
 we can see is we see that long hash these

174
00:08:35.500 --> 00:08:38.200
 truncated a little bit there and then we

175
00:08:38.200 --> 00:08:41.400
 can see the image we use which was the Maria DB container

176
00:08:41.400 --> 00:08:44.400
 image. This is just the command that was run that is

177
00:08:44.400 --> 00:08:47.700
 run inside that container image that actually starts a container we

178
00:08:47.700 --> 00:08:50.500
 can see it's been up. It was always created 23 seconds

179
00:08:50.500 --> 00:08:53.100
 ago and it's been running for 22 seconds.

180
00:08:53.900 --> 00:08:56.600
Here's the port mapping. It says anything on

181
00:08:56.600 --> 00:08:59.600
 our ec2 instance. That sends a

182
00:08:59.600 --> 00:09:02.500
 packet to 3306. Go ahead and forward

183
00:09:02.500 --> 00:09:03.700
 that to this container.

184
00:09:04.600 --> 00:09:08.000
Same 3306 it also uses IPv6

185
00:09:07.200 --> 00:09:10.300
 here, but we won't do that. And our name

186
00:09:10.300 --> 00:09:12.200
 for our container is the mariadb.

187
00:09:13.200 --> 00:09:16.700
Okay, so I'm gonna clear the screen now and let's

188
00:09:16.700 --> 00:09:19.500
 explore what some of the docker commands we have that are

189
00:09:19.500 --> 00:09:23.000
 important. And the first one is logs. Obviously

190
00:09:22.300 --> 00:09:25.400
 seeing a log of an application if you troubleshooting or

191
00:09:25.400 --> 00:09:28.600
 if you just want to see if it's working correctly or if

192
00:09:28.600 --> 00:09:31.600
 it's working at all. You could use the docker logs

193
00:09:31.600 --> 00:09:35.000
 command and then we're going to use the name of our container, which

194
00:09:34.500 --> 00:09:35.900
 is Maria DB.

195
00:09:36.800 --> 00:09:39.600
And hit return as you can see I get

196
00:09:39.600 --> 00:09:42.200
 all the logs from the standard out and standard error and

197
00:09:42.200 --> 00:09:46.000
 standard in standard on standard error from the container that's

198
00:09:45.300 --> 00:09:48.900
 running and you can see here. Basically the

199
00:09:48.900 --> 00:09:51.200
 last Vlog amount here. It says the buffer pool

200
00:09:51.200 --> 00:09:54.500
 loaded completed, but if you were running into errors and your

201
00:09:54.500 --> 00:09:57.100
 container wasn't starting this would be a really great place to go ahead and

202
00:09:57.100 --> 00:09:58.900
 look to troubleshoot that

203
00:10:00.200 --> 00:10:03.700
okay. So the next thing we want to do, let me clear the screen here. So

204
00:10:03.700 --> 00:10:06.400
 now that we have this container running we need

205
00:10:06.400 --> 00:10:09.100
 to be able to access it because what good is it if we can't

206
00:10:09.100 --> 00:10:09.900
 do anything with it, so

207
00:10:10.700 --> 00:10:13.200
We can do this either. So there's two ways we can actually

208
00:10:13.200 --> 00:10:16.800
 test the connectivity and access to the database so

209
00:10:16.800 --> 00:10:19.600
 we can either stall them or read database client on our

210
00:10:19.600 --> 00:10:21.200
 ec2 instance using yum.

211
00:10:21.800 --> 00:10:24.300
Or we can actually shell into

212
00:10:24.300 --> 00:10:27.400
 the running container and use whatever tooling it

213
00:10:27.400 --> 00:10:30.600
 has there to connect to it. So not every container

214
00:10:30.600 --> 00:10:33.400
 is gonna have a Marie database client or telnet or

215
00:10:33.400 --> 00:10:37.100
 whatever else you could use to actually connect to this service. Now

216
00:10:36.100 --> 00:10:40.100
 in this case the Maria DB container image

217
00:10:39.100 --> 00:10:42.100
 actually has the mariad database client, but

218
00:10:42.100 --> 00:10:45.200
 we're gonna skip that for now, but what I want to show you

219
00:10:45.200 --> 00:10:48.500
 is how you could connect to it from your your regular

220
00:10:48.500 --> 00:10:51.100
 ec2 instance host and actually make a connection all the way

221
00:10:51.100 --> 00:10:54.300
 into the Container. So to do that we need to install the Maria

222
00:10:54.300 --> 00:10:57.500
 database package here on this ec2 instance.

223
00:10:57.500 --> 00:11:00.100
 It's already in our young repo so

224
00:11:00.100 --> 00:11:03.400
 you don't have to do a search for it. So just do the regular

225
00:11:03.400 --> 00:11:04.200
 pseudo yum.

226
00:11:05.400 --> 00:11:07.700
Install Maria DB.

227
00:11:08.300 --> 00:11:11.300
And there we go. It says it's

228
00:11:11.300 --> 00:11:14.300
 gonna install the Marie DB package confirmation. Yes, we know

229
00:11:14.300 --> 00:11:14.900
 what we're doing.

230
00:11:16.100 --> 00:11:19.800
Okay, so this actually even though this

231
00:11:19.800 --> 00:11:22.400
 is this is gets maybe a little bit convoluted here.

232
00:11:22.400 --> 00:11:25.300
 But so Marie DB is a fork of my

233
00:11:25.300 --> 00:11:28.000
 Sequel and at this particular point in time

234
00:11:28.700 --> 00:11:31.600
 the Marie DB still used the my sequel client. So

235
00:11:31.600 --> 00:11:34.500
 the command line was actually called my sequel instead

236
00:11:34.500 --> 00:11:37.300
 of Maria DB. So we are gonna actually be using

237
00:11:37.300 --> 00:11:38.400
 the my sequel client.

238
00:11:39.600 --> 00:11:42.400
Executable to actually connect to the Marie database

239
00:11:42.400 --> 00:11:43.300
 inside the container.

240
00:11:44.100 --> 00:11:47.000
I know that's a little weird it changes later on. But this is

241
00:11:47.200 --> 00:11:50.200
 the versions we have right now. So I'm gonna go ahead and clear the screen.

242
00:11:52.100 --> 00:11:55.100
And if you recall where we can we can connect

243
00:11:55.100 --> 00:11:58.300
 to it. This container is listening on any

244
00:11:58.300 --> 00:12:01.400
 interface on our ec2 instance on Port 3306.

245
00:12:02.700 --> 00:12:05.800
So we should just be able to try to connect to just

246
00:12:05.800 --> 00:12:09.700
 local host or 127.0.0.1 or

247
00:12:09.700 --> 00:12:12.200
 if you remember it's called the loopback interface.

248
00:12:13.300 --> 00:12:16.500
Using what we did earlier. So let's

249
00:12:16.500 --> 00:12:19.200
 go ahead and try that out. So we're gonna use

250
00:12:19.200 --> 00:12:20.700
 the my SQL command.

251
00:12:21.500 --> 00:12:24.600
And we're going to use the host flag in this

252
00:12:24.600 --> 00:12:27.200
 case. We'll use the Local Host.

253
00:12:28.800 --> 00:12:29.100
3306 port

254
00:12:30.200 --> 00:12:32.700
the user is lab - user.

255
00:12:33.500 --> 00:12:36.500
And password, so we're

256
00:12:36.500 --> 00:12:39.100
 not going to add the password to the command line because it would show up in

257
00:12:39.100 --> 00:12:42.200
 the bash history. That wouldn't be really safe. But what by doing just

258
00:12:42.200 --> 00:12:45.200
 the dash test password to mySQL client will prompt us to

259
00:12:45.200 --> 00:12:46.300
 enter our password.

260
00:12:47.200 --> 00:12:50.000
Okay, so from here I should be able to hit return.

261
00:12:50.800 --> 00:12:53.600
And it prompts us for the password. And if

262
00:12:53.600 --> 00:12:56.600
 you remember it was lab-secret -

263
00:12:56.600 --> 00:12:59.200
 password and then here we

264
00:12:59.200 --> 00:13:02.200
 are. We are connected into the Maria database that

265
00:13:02.200 --> 00:13:05.200
 is running inside the container from a connection from our

266
00:13:05.200 --> 00:13:08.300
 ec2 instance host. So obviously you could

267
00:13:08.300 --> 00:13:11.400
 run any my SQL queer Armory database query

268
00:13:11.400 --> 00:13:15.200
 that you know, I will just run show databases with

269
00:13:14.200 --> 00:13:17.200
 the semicolon and just to make

270
00:13:17.200 --> 00:13:21.400
 sure it works and you can tell be in that this is a new instance of

271
00:13:21.400 --> 00:13:24.300
 Marie database is not going to be any databases. We

272
00:13:24.300 --> 00:13:24.800
 didn't create any.

273
00:13:25.400 --> 00:13:28.200
So there we are so to get out of this you can type quit.

274
00:13:29.200 --> 00:13:32.400
Okay, so we've tested access everything is

275
00:13:32.400 --> 00:13:35.200
 running and working so I'm gonna clear the screen

276
00:13:35.200 --> 00:13:35.800
 one more time

277
00:13:36.600 --> 00:13:39.900
So if you recalled we have this

278
00:13:39.900 --> 00:13:42.400
 Docker it container running. So

279
00:13:42.400 --> 00:13:45.300
 let's say you didn't want it to stay running and you wanted it

280
00:13:45.300 --> 00:13:46.000
 to just go away.

281
00:13:47.400 --> 00:13:50.500
One way you could do. This is you could just do stop Maria DB.

282
00:13:52.300 --> 00:13:55.300
And as you can see, we get the name of

283
00:13:55.300 --> 00:13:57.800
 their container back Docker thinks is done its best.

284
00:13:59.100 --> 00:14:02.600
Effort to make sure it stopped and if we look it's gone, it's not

285
00:14:02.600 --> 00:14:05.300
 removed. It's still there. And if we did

286
00:14:05.300 --> 00:14:09.000
 a dash a to the PS that'll show even stop containers

287
00:14:08.600 --> 00:14:11.800
 and you can see that it exited with a

288
00:14:11.800 --> 00:14:14.500
 clean exit 17 seconds ago. So now

289
00:14:14.500 --> 00:14:17.400
 if we go back up and we change the stop to start.

290
00:14:18.800 --> 00:14:21.400
It'll start the container back up because we

291
00:14:21.400 --> 00:14:24.300
 didn't remove it with all the same environment variables the same

292
00:14:24.300 --> 00:14:25.600
 password everything that we had before.

293
00:14:26.500 --> 00:14:30.000
And if we get rid of the a now we can see the

294
00:14:29.500 --> 00:14:31.400
 container is running.

295
00:14:32.600 --> 00:14:36.300
And if we want to we could also do

296
00:14:35.300 --> 00:14:38.300
 a logs on it and we

297
00:14:38.300 --> 00:14:41.900
 can see that everything looks like it's still coming up so ready

298
00:14:41.900 --> 00:14:44.600
 for connections. We can see it right there in this

299
00:14:44.600 --> 00:14:47.500
 log line. So all great. Okay.

300
00:14:47.500 --> 00:14:50.500
 So let's jump back over. Let's do a recap

301
00:14:50.500 --> 00:14:51.800
 of what we did in this video.

302
00:14:53.100 --> 00:14:56.800
Okay. So let's talk about we did in this video you install Docker

303
00:14:56.800 --> 00:14:59.800
 from the package repository using young you use

304
00:14:59.800 --> 00:15:03.200
 the docker command to run the latest version of DB. We

305
00:15:02.200 --> 00:15:05.500
 installed the Maria database client and

306
00:15:05.500 --> 00:15:07.400
 connected the DB inside the container.

307
00:15:08.100 --> 00:15:11.500
Finally, you got to learn some Docker commands to manage containers like

308
00:15:11.500 --> 00:15:13.300
 pull stop start.

309
00:15:14.200 --> 00:15:17.600
These are all come in handy as you grow or you

310
00:15:17.600 --> 00:15:21.100
 start using containerization more in your everyday workloads.

311
00:15:23.300 --> 00:15:26.400
Okay, so congratulations, you have finished section

312
00:15:26.400 --> 00:15:29.400
 4 in this section, you put your Linux lab

313
00:15:29.400 --> 00:15:32.900
 host to good use and you build some great foundational

314
00:15:32.900 --> 00:15:35.600
 administrative knowledge of how to manage and monitor

315
00:15:35.600 --> 00:15:36.800
 a Linux host in the cloud.

316
00:15:37.600 --> 00:15:40.800
In the next section, you'll learn subscripting Basics

317
00:15:40.800 --> 00:15:42.300
 with bash. See you soon.
