Containers

Linux containers

What are containers?

A Container can be seen as a minimal virtual environment that can be used in any Linux-compatible machine (and beyond).

Using containers is time- and resource-saving as they allow:

  • Controlling for software installation and dependencies.

  • Reproducibility of the analysis.

Containers allow us to use precisely the identical versions of the tools.

Virtual machines or containers?

Virtualisation

Containerisation (aka lightweight virtualisation)

Abstraction of physical hardware

Abstraction of application layer

Depends on hypervisor (software)

Depends on host kernel (OS)

Do not confuse with hardware emulator

Application and dependencies bundled all together

Enable virtual machines

Every virtual machine with an OS (Operating System)

_images/vms-containers.png

Source

Pros and cons

ADV

Virtualisation

Containerisation

PROS.

  • Very similar to an entire OS.

  • High OS diversity.

  • No need for complete OS installation (less space).

  • Better portability.

  • Faster than virtual machines.

  • Easier automation.

  • Easier distribution of recipes.

CONS.

  • Need more space and resources.

  • Slower than containers.

  • Not that good automation.

  • Some cases might be different from an entire OS.

  • Still less OS diversity, even with current solutions.