A better way to learn containers

Disclaimer

Container = OCI compliant container (e.g Docker container).

Docker’s logo

What a container is not ?!

Containers vs VMs: the bad analogy

Docker vs VMs

Wrong again

Containers are running on/by the kernel (not on the CE)

Linux Kernel Containers

Confusions

  • How to SSH into a container ?
  • How to execute more than one CMD per container ?
  • How come the container exits after docker run <img> ?
  • How to provision (Ansible, Chef …) my docker container ?
  • Why shouldn’t I install my deps directly in the container using docker exec -it \<container\> apt install \<pkg\> Instead of using images and Dockerfiles ?

What is a container ?!

Containers are nothing but “special” linux processes

  • Linux technologies
    • Namespaces (PID, UID, MOUNT, NET …)
    • Chroot
    • Cgroups
    • SELinux, AppArmor
    • Capabilities
    • SECCOMP
  • “Linux containers” is not a real thing !!

Why are containers compared to VMs ? (OS virtualization Era)

Containers history

Running containers

Container lifecycle

Running Containers

Case study: Docker

Docker runtime

Case Study: PBS (container-tools)

PBS

System container runtimes: LXC/LXD, OpenVZ …

PBS

Thank you

Let’s be friends! 🤗