SlideShare a Scribd company logo
1 of 30
Download to read offline
Introduction to Containers
OR
How containers are changing the development & deployment story
across the software industry?
Agenda
● Linux containers
● Docker
● Kubernetes
● Development
● Deployment
● Microservices
Popularity of Containers
Virtualization
● Virtualization was around since decades
● But it got popular only in 2000s
● Lack of interest from hardware vendors
● Chip manufacturers saw the market opportunity
● Club that with cheapest OS platform adding support
Containers
● First available in Solaris and BSD
● Came to Linux somewhat later
● Docker made them really easy
● In a way, Linux and Docker made them popular
Linux Containers
Linux Containers
● Linux Kernel provides cgroups and namespaces
● cgroups help limit the resource consumption without a VM
● namespaces help completely isolate the process
● Combination of these two helps create containers
● Containers have been around since a long time
● Google says it runs everything in containers since decade+
Containers vs. VMs
Containers
● Use kernel of the host
● Contains only application binaries
and dependencies
● Lesser attack surface
● Can be spun up and ready to use in
milliseconds
● Container images are generally of
smaller size (in MBs)
Virtual Machines
● Have a kernel of their own
● Contains entire OS along with
application binaries and deps
● Higher attack surface
● Takes seconds or minutes before
being fully usable
● ISOs are generally more than 1 GiB
in size
Docker
Docker
● Started out as “dotCloud” PaaS company
● Made the containers and related things easy-to-use
● De facto container runtime for a long time
● Now a tool to build images, manage containers, orchestrate, etc.
● Open-source project contributed to by many in the industry
● Open-source now under “Moby Project”
Docker commands
● docker build -t myimage .
● docker pull fedora
● docker run -it fedora /bin/bash
● docker run -d -p 80:80 webserver
● docker stop <container-name>
● docker rm <container-name>
● docker rmi webserver
Why container orchestration?
● Say you have a web app with a database
● You’d want a container to be able to reliably talk with the other
● You’d want to have multiple replicas running
● You’d want to load balance it
● You’d want to distribute them across different systems
● One instance of some container shouldn’t take entire app down
Kubernetes (k8s)
Kubernetes (k8s)
● Started at Google and later open-sourced
● Most popular container orchestration tool
● Orchestration tool helps run containers in production
● Code contributions from most major organizations
● Very nice community
● Distributions for cloud, hybrid and on-prem deployments
● minikube for developers
Kubernetes Features
● Groups containers into pods
● Container auto-scaling
● Provides basic load balancing OOTB
● Canary deployments
● Health checks
● Documentation
Kubernetes Distributions
● Google Kubernetes Engine
● Amazon ECS
● CoreOS Tectonic
● OpenShift by Red Hat
● StackPoint
● … much more!
Development & Deployment
using Containers
Development with Containers
● Pack binaries and artifacts in the container image
● Expose required functionality/ports of container
● Take the same image and run a container anywhere*
● Overruled “works on my laptop” argument to a great extent
● One container supposed to do only one thing (UNIX philosophy)
* physical/virtual machine, any distro, any cloud
Developer workflow
● Every dev is working on their fork of the code
● Before merging into main repo, it goes through automated tests
● Tests happen on environment similar to production
● Container images are created, tagged and pushed
● Quick feedback loop on the tests
● Also called Continuous Integration (CI of CI/CD)
● Great piece written by Martin Fowler
Deployment with Containers
● Automation FTW but one of the most critical part
● Ops teams deploy code multiple time a day
● Inter-container communication has to be smooth
● Blue-Green deployments becoming popular
● Rollback in case something blows up
● All these is easier said than done
Microservices Architecture
Monoliths
● Single WAR file that runs everything
● Seems perfect initially till the time it becomes huge
● CI/CD can take long time as size increases
● Scaling can become an issue
● In short all issues you can imagine related with larger size
Microservices
● Break service down into pieces: database, API, front-end, etc.
● Specialized frameworks can be used for tasks
● Individual services can be scaled up/down
● APIs can be reused by other services
Containers
are not
THE solution
Tools
● Git for version controlling the code
● Jenkins, Travis for CI
● Docker, Buildah to create containers
● OpenShift for deployment and built-in CI/CD mechanism
● Elastic, Logstash, Kibana for logging aggregation
● Prometheus, Zabbix for monitoring
● … much more!
Learn more!
Join these and more
communities to learn and/or
share!
● Kubernetes Ahmedabad
● Docker Ahmedabad
● Ansible Ahmedabad
● DigitalOcean Ahmedabad
About Me
● Engineer @ Red Hat
● Love building tech
communities, sharing
knowledge and organizing
+ speaking at meetups
● Twitter: @dharm1t
Web: dharmitshah.com
Resources
● Google Borg
● Continuous Integration - Martin Fowler (ThoughtWorks)
● Continuous Deployment - Viktor Farcic (Cloudbees)
● Kubernetes Documentation
● Docker
● Buildah
● OpenShift by Red Hat
● All Kubernetes distributions
● Containers are Linux

More Related Content

What's hot

Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein MainIntroduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Puja Abbassi
 

What's hot (20)

Introduction to Kubernetes - Docker Global Mentor Week 2016
Introduction to Kubernetes - Docker Global Mentor Week 2016Introduction to Kubernetes - Docker Global Mentor Week 2016
Introduction to Kubernetes - Docker Global Mentor Week 2016
 
containerd summit - Deep Dive into containerd
containerd summit - Deep Dive into containerdcontainerd summit - Deep Dive into containerd
containerd summit - Deep Dive into containerd
 
CNCF Projects Overview
CNCF Projects OverviewCNCF Projects Overview
CNCF Projects Overview
 
Containers without docker
Containers without dockerContainers without docker
Containers without docker
 
Containers in depth – understanding how containers work to better work with c...
Containers in depth – understanding how containers work to better work with c...Containers in depth – understanding how containers work to better work with c...
Containers in depth – understanding how containers work to better work with c...
 
From development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetesFrom development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetes
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in Docker
 
containerd and CRI
containerd and CRIcontainerd and CRI
containerd and CRI
 
Lightning talk about Docker
Lightning talk about DockerLightning talk about Docker
Lightning talk about Docker
 
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TXLinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
 
Containerd - core container runtime component
Containerd - core container runtime component Containerd - core container runtime component
Containerd - core container runtime component
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
 
Containers in production with docker, coreos, kubernetes and apache stratos
Containers in production with docker, coreos, kubernetes and apache stratosContainers in production with docker, coreos, kubernetes and apache stratos
Containers in production with docker, coreos, kubernetes and apache stratos
 
Hands on docker
Hands on dockerHands on docker
Hands on docker
 
Docker Workshop for beginner
Docker Workshop for beginnerDocker Workshop for beginner
Docker Workshop for beginner
 
WSO2Con ASIA 2016: WSO2 Cloud Strategy Update
WSO2Con ASIA 2016: WSO2 Cloud Strategy UpdateWSO2Con ASIA 2016: WSO2 Cloud Strategy Update
WSO2Con ASIA 2016: WSO2 Cloud Strategy Update
 
The state of containerd
The state of containerdThe state of containerd
The state of containerd
 
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein MainIntroduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
 
Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use cases
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 

Similar to Introduction to Containers

Similar to Introduction to Containers (20)

Kubernetes is all you need
Kubernetes is all you needKubernetes is all you need
Kubernetes is all you need
 
Azure ai on premises with docker
Azure ai on premises with  dockerAzure ai on premises with  docker
Azure ai on premises with docker
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
 
Scalable Spark deployment using Kubernetes
Scalable Spark deployment using KubernetesScalable Spark deployment using Kubernetes
Scalable Spark deployment using Kubernetes
 
Discussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machinesDiscussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machines
 
Speed & Agility of Innovation with Docker & Kubernetes
Speed & Agility of Innovation with Docker & KubernetesSpeed & Agility of Innovation with Docker & Kubernetes
Speed & Agility of Innovation with Docker & Kubernetes
 
Hello, Docker!
Hello, Docker!Hello, Docker!
Hello, Docker!
 
A curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & KubernetesA curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & Kubernetes
 
[Global logic] container runtimes and kubernetes
[Global logic] container runtimes and kubernetes[Global logic] container runtimes and kubernetes
[Global logic] container runtimes and kubernetes
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Docker up and Running For Web Developers
Docker up and Running For Web DevelopersDocker up and Running For Web Developers
Docker up and Running For Web Developers
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web Developers
 
Cloud Run and Containers
Cloud Run and ContainersCloud Run and Containers
Cloud Run and Containers
 
An Introduction to Docker
An Introduction to DockerAn Introduction to Docker
An Introduction to Docker
 
JOSA TechTalk: Introduction to docker
JOSA TechTalk: Introduction to dockerJOSA TechTalk: Introduction to docker
JOSA TechTalk: Introduction to docker
 
Containers not just for production nov8
Containers not just for production nov8Containers not just for production nov8
Containers not just for production nov8
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with Codefresh
 
Microsoft Techsummit Zurich Docker and Microsoft
Microsoft Techsummit Zurich Docker and MicrosoftMicrosoft Techsummit Zurich Docker and Microsoft
Microsoft Techsummit Zurich Docker and Microsoft
 

More from Dharmit Shah

More from Dharmit Shah (13)

Introducing CentOS container pipeline
Introducing CentOS container pipelineIntroducing CentOS container pipeline
Introducing CentOS container pipeline
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Git push to build, test and scan your containers
Git push to build, test and scan your containersGit push to build, test and scan your containers
Git push to build, test and scan your containers
 
Python in Industry
Python in IndustryPython in Industry
Python in Industry
 
Swarm mode
Swarm modeSwarm mode
Swarm mode
 
Ansible in CI
Ansible in CIAnsible in CI
Ansible in CI
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Atomic Developer Bundle
Atomic Developer BundleAtomic Developer Bundle
Atomic Developer Bundle
 
Docker tips & tricks
Docker  tips & tricksDocker  tips & tricks
Docker tips & tricks
 
Introducing docker
Introducing dockerIntroducing docker
Introducing docker
 
Rest apis with DRF
Rest apis with DRFRest apis with DRF
Rest apis with DRF
 
Docker hands-on
Docker hands-onDocker hands-on
Docker hands-on
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Introduction to Containers

  • 2. OR How containers are changing the development & deployment story across the software industry?
  • 3. Agenda ● Linux containers ● Docker ● Kubernetes ● Development ● Deployment ● Microservices
  • 5. Virtualization ● Virtualization was around since decades ● But it got popular only in 2000s ● Lack of interest from hardware vendors ● Chip manufacturers saw the market opportunity ● Club that with cheapest OS platform adding support
  • 6. Containers ● First available in Solaris and BSD ● Came to Linux somewhat later ● Docker made them really easy ● In a way, Linux and Docker made them popular
  • 7.
  • 9. Linux Containers ● Linux Kernel provides cgroups and namespaces ● cgroups help limit the resource consumption without a VM ● namespaces help completely isolate the process ● Combination of these two helps create containers ● Containers have been around since a long time ● Google says it runs everything in containers since decade+
  • 10. Containers vs. VMs Containers ● Use kernel of the host ● Contains only application binaries and dependencies ● Lesser attack surface ● Can be spun up and ready to use in milliseconds ● Container images are generally of smaller size (in MBs) Virtual Machines ● Have a kernel of their own ● Contains entire OS along with application binaries and deps ● Higher attack surface ● Takes seconds or minutes before being fully usable ● ISOs are generally more than 1 GiB in size
  • 12. Docker ● Started out as “dotCloud” PaaS company ● Made the containers and related things easy-to-use ● De facto container runtime for a long time ● Now a tool to build images, manage containers, orchestrate, etc. ● Open-source project contributed to by many in the industry ● Open-source now under “Moby Project”
  • 13. Docker commands ● docker build -t myimage . ● docker pull fedora ● docker run -it fedora /bin/bash ● docker run -d -p 80:80 webserver ● docker stop <container-name> ● docker rm <container-name> ● docker rmi webserver
  • 14. Why container orchestration? ● Say you have a web app with a database ● You’d want a container to be able to reliably talk with the other ● You’d want to have multiple replicas running ● You’d want to load balance it ● You’d want to distribute them across different systems ● One instance of some container shouldn’t take entire app down
  • 16. Kubernetes (k8s) ● Started at Google and later open-sourced ● Most popular container orchestration tool ● Orchestration tool helps run containers in production ● Code contributions from most major organizations ● Very nice community ● Distributions for cloud, hybrid and on-prem deployments ● minikube for developers
  • 17. Kubernetes Features ● Groups containers into pods ● Container auto-scaling ● Provides basic load balancing OOTB ● Canary deployments ● Health checks ● Documentation
  • 18. Kubernetes Distributions ● Google Kubernetes Engine ● Amazon ECS ● CoreOS Tectonic ● OpenShift by Red Hat ● StackPoint ● … much more!
  • 20. Development with Containers ● Pack binaries and artifacts in the container image ● Expose required functionality/ports of container ● Take the same image and run a container anywhere* ● Overruled “works on my laptop” argument to a great extent ● One container supposed to do only one thing (UNIX philosophy) * physical/virtual machine, any distro, any cloud
  • 21. Developer workflow ● Every dev is working on their fork of the code ● Before merging into main repo, it goes through automated tests ● Tests happen on environment similar to production ● Container images are created, tagged and pushed ● Quick feedback loop on the tests ● Also called Continuous Integration (CI of CI/CD) ● Great piece written by Martin Fowler
  • 22. Deployment with Containers ● Automation FTW but one of the most critical part ● Ops teams deploy code multiple time a day ● Inter-container communication has to be smooth ● Blue-Green deployments becoming popular ● Rollback in case something blows up ● All these is easier said than done
  • 24. Monoliths ● Single WAR file that runs everything ● Seems perfect initially till the time it becomes huge ● CI/CD can take long time as size increases ● Scaling can become an issue ● In short all issues you can imagine related with larger size
  • 25. Microservices ● Break service down into pieces: database, API, front-end, etc. ● Specialized frameworks can be used for tasks ● Individual services can be scaled up/down ● APIs can be reused by other services
  • 27. Tools ● Git for version controlling the code ● Jenkins, Travis for CI ● Docker, Buildah to create containers ● OpenShift for deployment and built-in CI/CD mechanism ● Elastic, Logstash, Kibana for logging aggregation ● Prometheus, Zabbix for monitoring ● … much more!
  • 28. Learn more! Join these and more communities to learn and/or share! ● Kubernetes Ahmedabad ● Docker Ahmedabad ● Ansible Ahmedabad ● DigitalOcean Ahmedabad
  • 29. About Me ● Engineer @ Red Hat ● Love building tech communities, sharing knowledge and organizing + speaking at meetups ● Twitter: @dharm1t Web: dharmitshah.com
  • 30. Resources ● Google Borg ● Continuous Integration - Martin Fowler (ThoughtWorks) ● Continuous Deployment - Viktor Farcic (Cloudbees) ● Kubernetes Documentation ● Docker ● Buildah ● OpenShift by Red Hat ● All Kubernetes distributions ● Containers are Linux