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

Intro to Docker

Intro to Docker

A whirlwind peek into containerization

Rupak Ganguly

October 16, 2018
Tweet

More Decks by Rupak Ganguly

Other Decks in Technology

Transcript

  1. INTRO TO DOCKER
    a whirlwind peek into containerization
    Rupak Ganguly | IT Workshop, Atlanta. Oct. 16th, 2018

    View Slide

  2. WHAT IS DOCKER?
    An open platform for building, shipping and running distributed
    applications inside containers.
    The platform consists of:
    The Docker Engine: a portable, lightweight runtime and
    packaging tool. It is the CLI that we interact with.
    The Docker Hub: A public/private registry for docker images,
    supporting sharing, and automatic builds.
    If it works on your machine, it will work anywhere.
    ensures repeatability
    removes dependency hell
    promotes portability

    View Slide


  3. Annual revenue is expected to increase by
    4x, growing from $749 million in 2016
    to more than $3.4 billion by 2021,
    representing a compound annual growth
    rate (CAGR) of 35 percent.
    - 451 Research

    View Slide

  4. DOWN THE MEMORY LANE
    Containers date back to 2000, FreeBSD
    Jails
    Solaris had similar concept called Zones
    Based on OpenVZ and LXC (Linux
    containers)
    Solomon Hykes stared Docker in France
    as an internal project with dotCloud
    Docker was first announced to public at
    PyCon in 2013
    Docker is built on top of LXC & linux kernel
    facilities like cgroups and namespaces.
    Docker v0.9 dropped LXC and replaced it
    with libcontainer library

    View Slide

  5. CONTAINERS vs. VMs
    Source: Docker

    View Slide

  6. CONTAINERS
    (portable)
    share the linux kernel &
    system/OS resources
    app code isolated and
    sandboxed
    very fast sub sec. startup
    VM HYPERVISORS
    (Hyper-V, KVM, Zen)
    are based on emulating
    virtual hardware
    pack a lot of fat that is
    unnecessary
    slow to start up
    VS
    CONTAINERS vs. VMs

    View Slide

  7. CONTAINERIZED APPLICATION
    It’s like sending a zip file of your document and
    image files rather than sending those along with
    OS on your machine.
    VMs include a full guest OS with its own memory management, device
    drivers, etc., while containers just have the app, bins, libs & its
    dependencies.
    Containers run as an isolated process on the host OS, and share the
    kernel with other containers.
    Containers are more portable and efficient than VMs. Containers can run
    on any OS or cloud.
    VMs can use different operating systems or kernels. All containers must
    use the same operating system and kernel.

    View Slide

  8. COMPOSING MULTI-SERVICE APPLICATIONS
    # docker-compose.yml
    version: "3"
    services:
    wp:
    image: wordpress
    ports:
    - 8080:80 # host_port:container_port
    environment:
    WORDPRESS_DB_PASSWORD: pass@word01
    WORDPRESS_DB_NAME: wordpress
    depends_on:
    - mysql
    mysql:
    image: mysql:5.5
    environment:
    MYSQL_ROOT_PASSWORD: pass@word01
    ports:
    - 3306:3306

    View Slide

  9. ORCHESTRATION
    Develop multi-container applications locally with either Docker
    Swarm or Kubernetes and run them in production
    Use Docker Compose to compose full multi-service applications

    View Slide

  10. DEMO
    Simple linux shell (busybox)
    Dev environments (ruby,nodejs,python)
    Single container application (hello-world)
    Multi-container application (wordpress + mysql db)

    View Slide

  11. END-TO-END WORKFLOW

    View Slide

  12. USE CASES
    Developer Productivity:
    Maintain multiple development environments on the host machine - Ruby,
    Python, Go, Node.js. Isolates environment without polluting the host machine
    Build & test composable, multi-microservices based applications locally.
    Shareability: Shared images via container public/private registries - DockerHub,
    Quay, AWS ECR
    Code Pipeline Management: Disposable build environments for CI/CD pipelines:
    CircleCI, Codeship, GitLab, Codefresh, TeamCity, Jenkins, TravisCI, GoCD, Docker
    Enterprise Edition
    Simplified Configuration Management decouples infrastructure requirements
    from application environment
    Rapid Deployment: Repeatable, identical environments - dev, stage, test and
    production
    App Isolation: Immutable, layered, version-tracked, reusable container images -
    run multiple versions of same software
    Multi-tenancy: Easy and inexpensive to create isolated environments for running
    multiple instances of app tiers for each tenant
    Infrastructure Consolidation & Cost Savings: Docker provides far denser server
    consolidation than you can get with VMs.

    View Slide

  13. CONTAINER PLATFORMS
    Docker Enterprise
    Amazon ECS & EKS, Google K8s Engine (GKE), Azure Container
    Service (ACS) & K8s Service (AKS)
    RedHat OpenShift
    CoreOS Tectonic
    Mesosphere
    Cloud Foundry
    Joyent Triton

    View Slide

  14. QUESTIONS?
    @rupakg
    rupakganguly.com

    View Slide