DOCKER - 9 Conteneur vs VMs

Hello everyone and welcome to this introductory course to Docker.
If you search the internet for a container definition, you will often see people comparing containers to virtual machines. There are certainly similarities, but there are just as many things that are simply not the same. Let's not even compare them to virtual machines, because in reality they are just a process. It is a process that runs on your operating system. It is very easy to understand the concept which is really only a restricted process in our operating system and nothing like a virtual machine. Let's start by creating a Mongo database. We'll call it mongo. We will run it in the background. And we use the Mongo image. We can see that it works and Docker also has something called docker top which will allow me to list the processes that are running in a specific container. We will see there that we have a unique process called Mongo d. We can use a list of processes, ps aux. This will list them all on the system. And you will see, one of them is called Mongo d. We can clearly see here that it is a process. It's not hiding in a virtual machine that we can't access. If I stop this container docker stop mongo, and do a docker ps. You will see that it is no longer in progress. You can make a docker top mongo. In fact, this is not going to give us anything because the container is not in progress. We can start again, docker start mongo, because that container was still there, but not running, in the background, kind of like a suspended process. We can redo a ps docker and it's up and running again. We can do a top mongo docker again and see that a process is running in the container again. That's all for this video but see you soon for the next one.