Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

“ 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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

CONTAINERS vs. VMs Source: Docker

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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.

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

END-TO-END WORKFLOW

Slide 12

Slide 12 text

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.

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

QUESTIONS? @rupakg rupakganguly.com