Containers
Are regarded as more resource-efficient
Offer higher-level isolation, with many applications running under the host operating system, all of them sharing certain operating system libraries and the operating system’s kernel
Have more a futuristic feel — a young and promising technology that doesn’t necessarily have every kink worked out.
Can be created much faster than virtual machines
Virtual Machine
Virtual machines offer the security of a dedicated operating system and harder logical boundaries.
VMs excel at providing extreme isolation
With a VM, a hypervisor talks to the hardware as if the virtual machine’s operating system and application constituted a separate, physical machine
Virtual machines are a highly developed and very mature technology, proven in running the most critical business workloads