1 00:00:06,570 --> 00:00:10,140 - We finished the demo now, so we'll just wrap things up. 2 00:00:10,140 --> 00:00:12,630 As you know, we've been running our MySQL database 3 00:00:12,630 --> 00:00:16,650 in a container, so we should remove Docker artifacts, 4 00:00:16,650 --> 00:00:18,870 just to tidy up our environment. 5 00:00:18,870 --> 00:00:21,960 So we need to stop and remove the MySQL container 6 00:00:21,960 --> 00:00:24,390 to actually stop the database engine from running. 7 00:00:24,390 --> 00:00:27,000 And then we should remove the MySQL image 8 00:00:27,000 --> 00:00:28,680 from our local Docker registry 9 00:00:28,680 --> 00:00:31,050 just to tidy up after ourselves. 10 00:00:31,050 --> 00:00:33,570 So then the first step, open the command window, 11 00:00:33,570 --> 00:00:36,810 and do a Docker container, RM -F 12 00:00:36,810 --> 00:00:39,030 and then you give it the name of the container. 13 00:00:39,030 --> 00:00:41,280 The RM -F option, 14 00:00:41,280 --> 00:00:44,970 the F option will forcibly remove the container. 15 00:00:44,970 --> 00:00:47,580 It'll stop it first if it's already running 16 00:00:47,580 --> 00:00:50,160 and then it'll remove it afterwards. 17 00:00:50,160 --> 00:00:53,280 After we've done that, we then do a Docker container LS, 18 00:00:53,280 --> 00:00:55,590 just to list the running containers. 19 00:00:55,590 --> 00:00:59,280 Hopefully our container won't be running anymore. 20 00:00:59,280 --> 00:01:01,200 Okay, so let's run these two commands. 21 00:01:01,200 --> 00:01:03,950 Open the command window and type these two commands in. 22 00:01:05,070 --> 00:01:10,070 Okay then, so Docker container remove forcibly 23 00:01:11,670 --> 00:01:16,560 and then the container's called MySQL container, like that. 24 00:01:16,560 --> 00:01:21,210 If you try to remove a container without the -F option, 25 00:01:21,210 --> 00:01:24,060 if a container was still running, it would fail, 26 00:01:24,060 --> 00:01:26,280 you can't remove something that's running, 27 00:01:26,280 --> 00:01:28,500 you'd have to stop it first and then remove it, 28 00:01:28,500 --> 00:01:31,200 but the -F option allows you to do it all at once. 29 00:01:31,200 --> 00:01:33,540 It'll stop it for you and then it remove it. 30 00:01:33,540 --> 00:01:35,073 Okay, so that should work. 31 00:01:38,430 --> 00:01:40,200 No error, so we'll assume that it's worked. 32 00:01:40,200 --> 00:01:42,720 And then we'll do a Docker container LS, 33 00:01:42,720 --> 00:01:45,363 just to list all running containers. 34 00:01:48,090 --> 00:01:49,140 And there aren't any, 35 00:01:49,140 --> 00:01:53,010 so our container has been successfully stopped and removed, 36 00:01:53,010 --> 00:01:53,843 that's good. 37 00:01:54,690 --> 00:01:57,540 So the last step is to remove the image itself. 38 00:01:57,540 --> 00:02:00,180 Docker image RM -F. 39 00:02:00,180 --> 00:02:01,920 The image was called MySQL image. 40 00:02:01,920 --> 00:02:03,360 So we'll remove the image 41 00:02:03,360 --> 00:02:05,190 and then we'll list the images afterwards 42 00:02:05,190 --> 00:02:07,173 and hopefully it'll have disappeared. 43 00:02:08,340 --> 00:02:09,570 Let's see. 44 00:02:09,570 --> 00:02:13,020 Okay, so here I am, back in my command prompt window. 45 00:02:13,020 --> 00:02:18,020 Docker image remove forcibly my SQL image. 46 00:02:21,390 --> 00:02:23,459 So this will hopefully remove the image. 47 00:02:23,459 --> 00:02:26,040 Untagged basically means the name has been removed 48 00:02:26,040 --> 00:02:28,740 and then it's physically been deleted from the registry. 49 00:02:28,740 --> 00:02:31,920 So the very, very last step is just to make sure 50 00:02:31,920 --> 00:02:34,140 that the image really has finished. 51 00:02:34,140 --> 00:02:36,723 And gone Docker image LS. 52 00:02:38,580 --> 00:02:40,800 Well, I've got lots of other images, 53 00:02:40,800 --> 00:02:45,570 but I'm hoping that my image, my SQL image isn't there. 54 00:02:45,570 --> 00:02:47,730 I can check that more accurately, 55 00:02:47,730 --> 00:02:52,590 more easily by saying Docker image LS, 56 00:02:52,590 --> 00:02:53,580 and then give it the actual name 57 00:02:53,580 --> 00:02:54,990 of the image I'm looking for, 58 00:02:54,990 --> 00:02:58,620 or hopefully not looking for, my SQL-image. 59 00:02:58,620 --> 00:03:00,030 I'm hoping that there aren't any images 60 00:03:00,030 --> 00:03:01,233 with that name anymore. 61 00:03:02,670 --> 00:03:03,630 Indeed not. 62 00:03:03,630 --> 00:03:05,790 So there we are, and that's the end of the demo 63 00:03:05,790 --> 00:03:08,190 and the end of all the demos. 64 00:03:08,190 --> 00:03:09,190 Thank you very much.