I did some google
https://devopscon.io/blog/docker/docker-vs-virtual-machine-where-are-the-differences/
Dont know is it I mental block but i cant really absorb.
Difference of Docker Vs Vm is it this:
Docker: works like a program. U fire up and u got everything already done
VM: like a blank computer u need to fit similar hardware if not it doesnt work?
Do i Understand correctly?
Actually reason asking this is cos im doing a project, cher say cannot use vm image. if i use docker image is it same as using vm image?
not same right?
Thank you for your valueable input.
Not the same level of technologies.
Virtual Machines is hardware abstraction using largely software. The known terminology is Virtualisation. Virtualisation involves largely software with hardware assistance. There is another similar concept known as emulation. Emulation is abstraction of hardware using pure software. There is no need to specialised hardware to assist. QEmu when used as emulation works this way, same for a lot of other game console emulation technique. Virtualisation requires the use of hardware features such as Intel's VT-x & VT-d & VT-c, AMD's AMD-V to provide near native speed virtualisation.
In both Virtualisation and Emulation, the objective is to create a simulated hardware abstraction of the target hardware. Hence the layer of simulation here is Hardware. That is why one can run Windows on Linux/Mac, Linux on Windows/Mac, Mac on Windows/Linux. The guest machine can be of total different specification from the host machine, and it is therefore possible to run different guest OS on different host OS. The best example of guest and host machine differences you see right know is iOS simulator (ARM) on Mac Intel x86 hardware, and also Android(ARM) on any x86 hardware. Likewise it is also possible to have x86 emulation on ARM architecture.
Docker is built upon Linux container technology. It is a higher level abstraction, but not virtualisation nor emulation. As the terminology "container" implies, container is a compartmentalisation technique. While you can have dockers in Mac OS X and Microsoft Windows, they are actually working inside a Linux virtual guest machine. If you run dockers/LXC in Linux, there is no virtualisation nor emulation. It is container inside bare metal running Linux OS. Of course, nothing stop you from running dockers/LXS running nested in a Linux virtual machine on a Linux bare metal, or a dedicated hypervisor Type 1 like VMWare ESXi or Microsoft HyperV, or other hypervisor Type 2 like VMWare workstation, player, fusion, Parallels Desktop etc.
Container is compartmentalised or sandboxed in Linux, but all containers run off the SAME linux kernel of the host OS kernel. The main technology that drives container is Linux cgroups, along side with iptables, and linux OS's native process and memory management. Inside the container, the "view" is constraint by what the Linux OS offers. Think of it like chroot, jail root, jail shell, but beyond just the shell level. It works at the kernel level provided by the Linux kernel. You may see a different Linux variant, but all the processing runs of the same linux kernel of the host OS.
Virtual machine image describe the hardware specification to be offered in the guest machine. Docker image describe the filesystem layers to be stacked on top of the host OS, so that when it is running, it is running using the variant of linux that you wanted it to be contained within the container. That is why it is possible to run alpine container inside a ubuntu OS, or RHEL OS, but it is not the alpine linux kernel that is running, it is the actual host OS's kernel, which could be Ubuntu's compiled version or RHEL compiled version.