Linux Format

CONTAINERS VS HYPERVISOR­S

-

Virtualisa­tion is another way to separate applicatio­ns or services – such as enabling you to easily run separate instances of applicatio­ns on one physical PC. A virtual PC (whether you use Virtualbox, Vmware or any other version) emulates a full hardware stack, so every virtual instance needs a full OS installati­on. While you can simplify this process by copying an existing virtual machine, you cannot avoid the inevitable duplicatio­n of system files. Enterprise versions often provide tools to streamline this process, but they come at a cost.

The biggest difference is that most container platforms (including Docker as used in this tutorial) provide tools to bring your container into a known state, be that versions of libraries, configurat­ion files or exposed network ports. In contrast, with a virtual machine you need to install the OS, install packages, copy configurat­ion files, etc. (either manually or using a tool such as Ansible or Saltstack). Another significan­t advantage is volume mapping, which allows us to map a directory on our container (for example /etc/resolv.conf) to a file contained on our host file system. This feature is not only restricted to individual files, but also whole directorie­s.

Despite this containers are not the solution to every requiremen­t – they tend to work best when you can break a service into multiple small pieces (e.g. web database, etc.) and coordinate them via something like Docker Compose. The industry buzzword for this approach is using micro-services.

Newspapers in English

Newspapers from Australia