dockervirtual-machineenvironments

Docker vs Virtual Machine


I have read documents that are about dockers and VMs.I guess that our environments like that dev,prod run on virtual machines in a server.Each of them runs on different virtual machine but single computer(server).Also,each virtual machine contains docker.Every docker contains containers.In this containers, application image file is hold.For example; in virtual machineB ,containerB includes image for our application.Am i right?

Can a docker contains many containers? Why we need many containers in a docker? Can anyone explain docker,virtual machine,environments and image files?How these enviroments runs server?


Solution

  • From https://www.docker.com/what-container: A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it.

    Docker is the service to run multiple containers on a machine (node) which can be on a vitual machine or on a physical machine.

    A virtual machine is an entire operating system (which normally is not lightweight).

    If you have multiple applications and those require different configurations which are in conflict with each other you can either deploy them on different machines or on the same machine using docker containers, because containers are isolated from each other.

    So in short containers can make your application deployment and management easier.