Docker deep-dive

Fact

Setting Expectation

What's the hype about containerization?

Rise of cloud native

  • Provides Scalability
  • Provides Isolation and Security
  • Provides Predictable execution

As VMs were not very scalable, cloud community was looking for some new solutions. Meanwhile around 2002-2007 linux kernel was getting equipped with Namespace and cgroups.

Evolution of linux containers

What is a container?

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. >Docker

The word “container” doesn’t mean anything super precise. Basically there are a few new Linux kernel features (“namespaces” and “cgroups”) that let you isolate processes from each other. When you use those features, you call it “containers”. >Julia Evans

We'll follow bottom-up approach to understand c14n

First experiment with lunux kernel features

Then how container aka. Docker implements those

Let's dive in

Name + space

Lexmark[avik avik avik sourav sourav rajib]

DevOps[avik sourav rajib] Sales[avik sourav] Web[avik rajib]

  • Java packages
  • DNS hierarchy
  • Directory structure

Linux namespaces

  • Process id namespace
  • Network namespace
  • Mount namespace
  • IPC namespace
  • User namespace
  • Cgroup namespace
  • UTS namespace

Demonstration

control groups

Linux control groups

  • Memory resource
  • CPU resource
  • Device resource
  • Network resource
  • Block IO
  • UTS namespace

Demonstration

Business case

Docker architecture

Demonstration

Coming up

References

https://www.ianlewis.org/en/container-runtimes-part-1-introduction-container-r
https://www.ianlewis.org/en/container-runtimes-part-2-anatomy-low-level-contai
https://www.redhat.com/en/blog/architecting-containers-part-3-how-user-space-affects-your-application
https://www.redhat.com/en/blog/architecting-containers-part-1-why-understanding-user-space-vs-kernel-space-matters
https://www.redhat.com/en/blog/architecting-containers-part-2-why-user-space-matters
https://www.redhat.com/en/topics/containers/whats-a-linux-container
https://jvns.ca/blog/2016/10/10/what-even-is-a-container/
http://alexander.holbreich.org/docker-components-explained/
https://www.youtube.com/watch?v=VWuHWfEB6ro
https://www.youtube.com/watch?v=8fi7uSYlOdc&list=LLGAfvU4MGXm6aHkUA9DPE9Q&index=6&t=1830s