- We finished the demo now, so we'll just wrap things up.
As you know, we've been running our MySQL database
in a container, so we should remove Docker artifacts,
just to tidy up our environment.
So we need to stop and remove the MySQL container
to actually stop the database engine from running.
And then we should remove the MySQL image
from our local Docker registry
just to tidy up after ourselves.
So then the first step, open the command window,
and do a Docker container, RM -F
and then you give it the name of the container.
The RM -F option,
the F option will forcibly remove the container.
It'll stop it first if it's already running
and then it'll remove it afterwards.
After we've done that, we then do a Docker container LS,
just to list the running containers.
Hopefully our container won't be running anymore.
Okay, so let's run these two commands.
Open the command window and type these two commands in.
Okay then, so Docker container remove forcibly
and then the container's called MySQL container, like that.
If you try to remove a container without the -F option,
if a container was still running, it would fail,
you can't remove something that's running,
you'd have to stop it first and then remove it,
but the -F option allows you to do it all at once.
It'll stop it for you and then it remove it.
Okay, so that should work.
No error, so we'll assume that it's worked.
And then we'll do a Docker container LS,
just to list all running containers.
And there aren't any,
so our container has been successfully stopped and removed,
that's good.
So the last step is to remove the image itself.
Docker image RM -F.
The image was called MySQL image.
So we'll remove the image
and then we'll list the images afterwards
and hopefully it'll have disappeared.
Let's see.
Okay, so here I am, back in my command prompt window.
Docker image remove forcibly my SQL image.
So this will hopefully remove the image.
Untagged basically means the name has been removed
and then it's physically been deleted from the registry.
So the very, very last step is just to make sure
that the image really has finished.
And gone Docker image LS.
Well, I've got lots of other images,
but I'm hoping that my image, my SQL image isn't there.
I can check that more accurately,
more easily by saying Docker image LS,
and then give it the actual name
of the image I'm looking for,
or hopefully not looking for, my SQL-image.
I'm hoping that there aren't any images
with that name anymore.
Indeed not.
So there we are, and that's the end of the demo
and the end of all the demos.
Thank you very much.