Container Virtualization


Container virtualization is an operating system virtualization deployment containing everything required to run a service, application, or microservice.

  • aka containerization
  • encapsulate all necessary components for software within a portable unit termed a container or cell
    • including code, libraries, and configurations
  • leverages the hosts operating system
    • doesn’t use own OS
  • isolates software
    • ensures consistent application behavior regardless of the underlying platform on which it runs
  • dispenses with the idea of a hypervisor and instead enforces resource separation at the OS level
  • OS defines isolated containers for each user instance to run in
  • Each container is allocated CPU and memory resources
    • but the processes all run through the native OS kernel
  • containers may run slightly different OS distributions but cannot run guest OSs of different types
    • aka, could not run Windows or Ubuntu in a RedHat Linux
  • alternatively, the containers might run separate application processes
    • in which case, the variables and libraries required by the application process are added to the container
  • best known containerization product is Docker
  • underpins many cloud services
    • supports microservices and serverless architecture
  • widely used to implement corporate workspaces on mobile devices

Example

  • All components required to deliver a web application could be deployed in containers and managed using a container platform such as Docker
  • This differs significantly from installing the components from a code repository directly “into” the operating system and manually editing all associated configuration files
  • By leveraging containers, different application components can be “swapped,” avoiding many complexities associated with traditional software installation and configuration
  • Traditional methods frequently encounter issues because the target system’s configuration has different versions of software and libraries needed by the new components
  • A dependency nightmare often manifests as a frustrating cycle of attempting to resolve conflicts by updating or downgrading dependencies, only to encounter new issues or break existing functionality in the process.
    • This wastes time and effort for developers navigating through a maze of dependencies
  • Containerized applications avoid this because they are self-contained units, each holding an independent copy of its dependencies