Skip to content

Container Basics

homepage-banner

Introduction

A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.

How Do Containers Work?

Containers rely on a technology called containerization, which involves isolating an application and its dependencies from the underlying host system. Each container runs on top of a shared operating system kernel, but has its own isolated file system, network stack, and process space. This allows multiple containers to run on the same host system without interfering with each other.

Benefits of Containers

So why are containers so popular in modern software development? Here are just a few of the key benefits:

  • Portability: Containers can be easily moved between different environments, from development to testing to production, without needing to worry about compatibility issues or dependencies.
  • Scalability: Containers can be quickly and easily scaled up or down to meet changing demand, without needing to provision new hardware or virtual machines.
  • Efficiency: Containers use fewer resources than traditional virtual machines, making them faster to deploy and run.

chronology-of-container.png

container-orchestrators.png

Comparing Containers and Virtual Machines

Containers and virtual machines have similar resource isolation and allocation benefits, but function differently because containers virtualize the operating system instead of hardware. Containers are more portable and efficient.

container-vs-vm.png

Container Runtimes

Containerd

containerd is available as a daemon for Linux and Windows. It manages the complete container lifecycle of its host system, from image transfer and storage to container execution and supervision to low-level storage to network attachments and beyond.

CRI-O

Open Container Initiative-based implementation of Kubernetes Container Runtime Interface.

LXC

LXC provides OS level virtualization through a virtual environment that has its own process and network space, it uses linux cgroups and namespaces to provide the isolation.

AWS Firecracker

https://aws.amazon.com/blogs/aws/firecracker-lightweight-virtualization-for-serverless-computing/

architecture.png

Reference

  • https://www.docker.com/
  • https://podman.io/
  • https://containerd.io/
  • https://mobyproject.org/
  • https://linuxcontainers.org/
  • https://cri-o.io/
Leave a message







Disclaimer
  • Welcome to visit the knowledge base of SRE and DevOps!
  • License under CC BY-NC 4.0
  • Made with Material for MkDocs and improve writing by generative AI tools
  • Copyright issue feedback me#imzye.com, replace # with @