Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Deep Dive Docker

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Deep Dive Docker

This presentation is brief on modern day container technology and related terminology.
It has notes about container runtime, ecosystem and details about Docker and Docker objects.

Avatar for Saad Waseem

Saad Waseem

June 22, 2020

Other Decks in Technology

Transcript

  1. Understanding Containers? • 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 image has all the configuration build into them via DockerFile that will be required by containerized application. • In simple words, running instance of docker image is called docker container.
  2. Container Runtime (Containerd) • Containerd manages the complete container lifecycle

    of its host system, from image transfer and storage to container execution and supervision to low-level storage, network attachments and beyond. • Responsible for managing all the low level or system level Details. • Provides API for tools like Kubelet, BuildKit etc.
  3. Container Technologies • AWS ECS • Azure CS • OpenStack

    • Openshift • CloudFoundry • CoreOS RKT • Kubernetes • And Many More
  4. VM vs Containers • Virtualization makes it possible for operating

    systems (Windows or Linux) run simultaneously on a single hardware system. • Containers share the same operating system kernel and isolate the application processes from the rest of the system. • Virtual Machine are heavy and consumes more resources • Containers are light weight, portable and efficient.
  5. Linux & Windows Container • Linux and Windows containers don’t

    work the same. • Containers build on two windows/Linux can not interchangeably run on both platforms seamlessly • Docker for windows runs Linux containers via Hyper-V • Likewise Windows containers run on Linux host via VM
  6. What is Docker? • Docker is an open platform for

    developing, shipping, and running applications. • Docker allows you to package an application with all of its dependencies into a standardized unit for software development. • Technology behind Docker uses Linux namespaces, cgroups and file system.
  7. Docker Components • Docker Daemon (dockerd) • Docker Client •

    Docker Engine • Docker Registry • Docker Objects
  8. Docker Engine • Docker Engine is a client-server application, installed

    on the host machine. • Server It is the docker daemon called dockerd. It can create and manage docker images. Containers, networks, etc. • Rest API It is used to instruct docker daemon what to do. • Command Line Interface (CLI) It is a client which is used to enter docker commands.
  9. Docker Registry • Docker registry stores Docker images. Docker Hub

    is a public registry that anyone can use to push and pull images. • Private Docker registry can also be set up by enterprises. • Docker should be configured to use right docker registry.
  10. Docker Images • An image is a read-only template with

    instructions for creating a Docker container. • DockerFile is used to build an image. • Image consists of layers so whenever Dockerfile Change only the difference is applied during image rebuild.
  11. Docker Volumes • Volume Containers are used to persist data

    when working with containers. Volumes are stored on the Host machine. • Bind Mounts is also another way of storing data. • Volumes exist out side of the container it self, hence they do not affect a container’s perforamce.
  12. Network Container • Docker support for networking containers through the

    use of network drivers. By default, Docker provides two network drivers for bridge and overlay. • By default the container is launched inside bridge network. • Custom Bridge Networks can be setup.
  13. Docker Tools • Docker CLI • Docker Compose • Docker

    Machine • Dive For Exploring Image Layers • Portainer, Container Management • Dockly, Enhanced shell for containers.
  14. Pros & Cons • IT-ops Operational Efficiency • Portability •

    Security • Runtime Efficiency Rapid build and destroy • Horizontal Scaling – Docker swarm • Local Development Flexibility • Smooth Deployment – Same host
  15. References • https://www.docker.com/products/windows-containers • https://www.docker.com/resources/what-container • https://containerd.io/ • https://www.docker.com/resources •

    https://www.redhat.com/en/topics/containers/whats-a-linux- container • https://devblogs.microsoft.com/premier-developer/running- docker-windows-and-linux-containers-simultaneously/ • https://linuxcontainers.org/lxc/introduction/