SlideShare a Scribd company logo
1 of 40
Download to read offline
Docker Intro
Puja Abbassi
@puja108
http://giantswarm.io
Simple microservice infrastructure,
built for developers.
Currently in free Alpha
Looking for feedback
http://giantswarm.io/
W
e’re hiring
Agenda
1) Docker Intro
● Why are we so excited?
● What is Docker?
● Getting started
2) Docker Microservices
Docker is an open-source
project to easily create
lightweight, portable, self-
sufficient containers from any
application.”
“ Linux
Why are we so
excited?
Installation
My Mac Timo’s
Linux
Test Staging Cloud VM Bare Metal
Rails Web
Frontend
? ? ? ? ? ?
Node.js
API
? ? ? ? ? ?
Background
jobs
? ? ? ? ? ?
MySQL ? ? ? ? ? ?
Distributed
DB
? ? ? ? ? ?
Message
Queue
? ? ? ? ? ?
Reusable Containers
My Mac Timo’s
Linux
Test Staging Cloud VM Bare Metal
Rails Web
Frontend
Node.js
API
Background
jobs
MySQL
Distributed
DB
Message
Queue
Speed
Ships
within ...
Manual
deployment
takes ...
Automated
deployment
takes ...
Boots in ...
Bare
metal
Days Hours Minutes Minutes
Virtual
machine
Minutes Minutes Seconds < Minute
Container Seconds Minutes Seconds Seconds
Dev ⇔ DevOps - Separation of
Concerns
Dev: Inside the
container
● my code
● my libraries
● my package
manager
● my app
● my data
Ops: Outside the
container
● Logging
● Remote Access
● Network
Configuration
● Monitoring
Who’s Using Containers?
What is Docker?
Based on existing technologies
● Namespaces
> Varying views on the system
> to provide isolated environments
> PID, NET, IPC, MNT, UTS, User
● CGroups
> control resources for a group of processes
> like CPU time, Memory, Network bandwidth, etc.
● Layered FS
● (LXC)
Layered FS
Base Image
Image
bootfs
Image
Writable Container Application Code
NodeJS
Nginx
Ubuntu
Cgroups, Namespaces,
Device Mapper, Kernel
But {insert some great UNIX
here} has had this for years.”“
Docker History
● Jan 2013: Initial commit
● September 2013: Redhat announces
collaboration
● June 2014: Google announces engagement
● August 2014: VMWare announces Docker support
● February 2015: Microsoft announces Docker
support
● April 2015: Docker raises $95 Million
● June 2015: Open Container Project announced
Docker is awesome
and here to stay.
Getting started
Installation
● Mac, Windows:
Boot2Docker
● Ubuntu:
$ sudo apt-get install docker.io
Run Containers
# run a command
$ docker run busybox echo hello
# run an interactive shell
$ docker run -i -t busybox /bin/sh
# run a Redis cache
$ docker run -d redis
A Node Script
// server.js
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello Worldn');
}).listen(8080);
console.log('Server running');
Simple Dockerfile
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y nodejs
ADD server.js .
EXPOSE 8080
CMD ["/usr/bin/nodejs", "/server.js"]
Build, Push, and Run
# build the image
$ docker build -t puja108/node .
# push it to the registry
$ docker push puja108/node
# run it (on any host)
$ docker run -d puja108/node
dockerbook.com
Docker in
Development
● Vagrant
● rbenv
● nodeenv
● virtualenv
● Laptop full of build tools and servers
Your current setup?
● Contains Build Tools
○ Can also be a separate container
● One (or more) container(s) for each stack
○ Use Docker Compose
● Runs the same regardless on which host or
in which environment
● Lightweight
○ Developer can actually have several environments
open directly on her laptop
Dev Containers
Docker Build
Chain
Jenkins - Docker Hub Integration
Jenkins - Docker Hub Integration
Docker Enables
new Architecture
Patterns
Patterns for the Cloud
Microservices
Responsive Manifesto
● Microservice Architectures
> Simple focussed services
> Highly decoupled
> Communicate over lightweight mechanisms
> HTTP APIs & Message Queues
> Polyglot (Language, Framework, Data Store)
> Built to fail
● Immutable Infrastructures
> Disposable components
> Make your state explicit
> Configure at run-time
The Next Steps in Cloud Architecture
Containers vs. VMs
Container
● Lightweight layers
above a shared
kernel
● Single service or
process
● New but promising
technology
● Enable #GIFEE
VM
● Complete (heavy)
Virtual System
● Application(s) with
several components
● Tried and trusted
Technology
Should I start with
Docker?
Yes!
Containers are only 1% of your
problem.”“ Kelsey Hightower,
CoreOS
Thanks for listening!
Reach out:
Puja Abbassi
@puja108
@giantswarm
Namespaces
The pid namespace: Used for process isolation (PID:
Process ID).
The net namespace: Used for managing network
interfaces (NET: Networking).
The ipc namespace: Used for managing access to IPC
resources (IPC: InterProcess Communication).
The mnt namespace: Used for managing mount-points
(MNT: Mount).
The uts namespace: Used for isolating kernel and version
identifiers. (UTS: Unix Timesharing System).
CGroups
Control group of processes.
Share available hardware resources.
Set up limits and constraints.
E.g. limiting the memory available to a
specific container.

More Related Content

What's hot

How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker Jonathan Martin
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetesBen Hall
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionRobert Reiz
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewiredotCloud
 
Dev with Docker WCPHX 2019
Dev with Docker WCPHX 2019Dev with Docker WCPHX 2019
Dev with Docker WCPHX 2019Maura Teal
 
Docker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker SlidesDocker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker SlidesDocker, Inc.
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeDr. Ketan Parmar
 
Docker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudDocker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudSamuel Chow
 
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQdotCloud
 
Containers without docker
Containers without dockerContainers without docker
Containers without dockerBen Hall
 
Intro to Docker and clustering with Rancher from scratch
Intro to Docker and clustering with Rancher from scratchIntro to Docker and clustering with Rancher from scratch
Intro to Docker and clustering with Rancher from scratchJohn Culviner
 
Getting started with docker
Getting started with dockerGetting started with docker
Getting started with dockerJEMLI Fathi
 
DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses  DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses Docker, Inc.
 
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)Docker, Inc.
 
John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14dotCloud
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - IndroducAl Gifari
 
Microservices using relocatable Docker containers
Microservices using relocatable Docker containersMicroservices using relocatable Docker containers
Microservices using relocatable Docker containersMauricio Garavaglia
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerChris Taylor
 
The state of containerd
The state of containerdThe state of containerd
The state of containerdDocker, Inc.
 

What's hot (20)

How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker How we dockerized a startup? #meetup #docker
How we dockerized a startup? #meetup #docker
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
 
Dev with Docker WCPHX 2019
Dev with Docker WCPHX 2019Dev with Docker WCPHX 2019
Dev with Docker WCPHX 2019
 
Docker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker SlidesDocker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker Slides
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker Compose
 
Docker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudDocker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google Cloud
 
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
 
Containers without docker
Containers without dockerContainers without docker
Containers without docker
 
Intro to Docker and clustering with Rancher from scratch
Intro to Docker and clustering with Rancher from scratchIntro to Docker and clustering with Rancher from scratch
Intro to Docker and clustering with Rancher from scratch
 
Getting started with docker
Getting started with dockerGetting started with docker
Getting started with docker
 
DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses  DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses
 
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)
 
John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14John Engates Keynote at Dockercon 14
John Engates Keynote at Dockercon 14
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
Microservices using relocatable Docker containers
Microservices using relocatable Docker containersMicroservices using relocatable Docker containers
Microservices using relocatable Docker containers
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and Docker
 
Docker on Windows
Docker on WindowsDocker on Windows
Docker on Windows
 
The state of containerd
The state of containerdThe state of containerd
The state of containerd
 

Viewers also liked

Service Orchestrierung mit Apache Mesos
Service Orchestrierung mit Apache MesosService Orchestrierung mit Apache Mesos
Service Orchestrierung mit Apache MesosRalf Ernst
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSLana Kalashnyk
 
How to Build Cloud-based Microservice Environments with Docker and VoltDB
How to Build Cloud-based Microservice Environments with Docker and VoltDBHow to Build Cloud-based Microservice Environments with Docker and VoltDB
How to Build Cloud-based Microservice Environments with Docker and VoltDBVoltDB
 
MicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache CamelMicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache CamelCharles Moulliard
 
CoreOS automated MySQL Cluster Failover using Galera Cluster
CoreOS automated MySQL Cluster Failover using Galera ClusterCoreOS automated MySQL Cluster Failover using Galera Cluster
CoreOS automated MySQL Cluster Failover using Galera ClusterYazz Atlas
 
Тарас Кирилюк — Docker basics. How-to for Drupal developers
Тарас Кирилюк — Docker basics. How-to for Drupal developersТарас Кирилюк — Docker basics. How-to for Drupal developers
Тарас Кирилюк — Docker basics. How-to for Drupal developersLEDC 2016
 
2015 03-11_todd-fritz_devnexus_2015
2015 03-11_todd-fritz_devnexus_20152015 03-11_todd-fritz_devnexus_2015
2015 03-11_todd-fritz_devnexus_2015Todd Fritz
 
Dockerize node.js application
Dockerize node.js applicationDockerize node.js application
Dockerize node.js applicationSeokjun Kim
 
Galera on kubernetes_no_video
Galera on kubernetes_no_videoGalera on kubernetes_no_video
Galera on kubernetes_no_videoPatrick Galbraith
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Giorgio Cefaro
 
Full lifecycle of a microservice
Full lifecycle of a microserviceFull lifecycle of a microservice
Full lifecycle of a microserviceLuigi Bennardis
 
A Dive Into Containers and Docker
A Dive Into Containers and DockerA Dive Into Containers and Docker
A Dive Into Containers and DockerMatthew Farina
 
Microservices architecture examples
Microservices architecture examplesMicroservices architecture examples
Microservices architecture examplesChanny Yun
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golangBo-Yi Wu
 
HP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and AnsibleHP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and AnsiblePatrick Galbraith
 
Building and deploying microservices with event sourcing, CQRS and Docker (QC...
Building and deploying microservices with event sourcing, CQRS and Docker (QC...Building and deploying microservices with event sourcing, CQRS and Docker (QC...
Building and deploying microservices with event sourcing, CQRS and Docker (QC...Chris Richardson
 
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)Chris Richardson
 
Service discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consulService discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consulJos Dirksen
 

Viewers also liked (20)

Service Orchestrierung mit Apache Mesos
Service Orchestrierung mit Apache MesosService Orchestrierung mit Apache Mesos
Service Orchestrierung mit Apache Mesos
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MS
 
How to Build Cloud-based Microservice Environments with Docker and VoltDB
How to Build Cloud-based Microservice Environments with Docker and VoltDBHow to Build Cloud-based Microservice Environments with Docker and VoltDB
How to Build Cloud-based Microservice Environments with Docker and VoltDB
 
Core os dna_automacon
Core os dna_automaconCore os dna_automacon
Core os dna_automacon
 
MicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache CamelMicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache Camel
 
Core os dna_oscon
Core os dna_osconCore os dna_oscon
Core os dna_oscon
 
CoreOS automated MySQL Cluster Failover using Galera Cluster
CoreOS automated MySQL Cluster Failover using Galera ClusterCoreOS automated MySQL Cluster Failover using Galera Cluster
CoreOS automated MySQL Cluster Failover using Galera Cluster
 
Тарас Кирилюк — Docker basics. How-to for Drupal developers
Тарас Кирилюк — Docker basics. How-to for Drupal developersТарас Кирилюк — Docker basics. How-to for Drupal developers
Тарас Кирилюк — Docker basics. How-to for Drupal developers
 
2015 03-11_todd-fritz_devnexus_2015
2015 03-11_todd-fritz_devnexus_20152015 03-11_todd-fritz_devnexus_2015
2015 03-11_todd-fritz_devnexus_2015
 
Dockerize node.js application
Dockerize node.js applicationDockerize node.js application
Dockerize node.js application
 
Galera on kubernetes_no_video
Galera on kubernetes_no_videoGalera on kubernetes_no_video
Galera on kubernetes_no_video
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015
 
Full lifecycle of a microservice
Full lifecycle of a microserviceFull lifecycle of a microservice
Full lifecycle of a microservice
 
A Dive Into Containers and Docker
A Dive Into Containers and DockerA Dive Into Containers and Docker
A Dive Into Containers and Docker
 
Microservices architecture examples
Microservices architecture examplesMicroservices architecture examples
Microservices architecture examples
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
HP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and AnsibleHP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and Ansible
 
Building and deploying microservices with event sourcing, CQRS and Docker (QC...
Building and deploying microservices with event sourcing, CQRS and Docker (QC...Building and deploying microservices with event sourcing, CQRS and Docker (QC...
Building and deploying microservices with event sourcing, CQRS and Docker (QC...
 
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
 
Service discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consulService discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consul
 

Similar to Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main

Azure ai on premises with docker
Azure ai on premises with  dockerAzure ai on premises with  docker
Azure ai on premises with dockerVishwas N
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Ambassador Labs
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with DockerAndrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with DockerAndrey Hristov
 
Container on azure
Container on azureContainer on azure
Container on azureVishwas N
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deploymentjavaonfly
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerAjeet Singh Raina
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...Ambassador Labs
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessDocker-Hanoi
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12dotCloud
 
Application Deployment on Openstack
Application Deployment on OpenstackApplication Deployment on Openstack
Application Deployment on OpenstackDocker, Inc.
 
Docker
DockerDocker
DockerNarato
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraDaniel Palstra
 
20170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 201720170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 2017Takayoshi Tanaka
 

Similar to Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main (20)

Azure ai on premises with docker
Azure ai on premises with  dockerAzure ai on premises with  docker
Azure ai on premises with docker
 
Docker - fundamental
Docker  - fundamentalDocker  - fundamental
Docker - fundamental
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
Docker for dev
Docker for devDocker for dev
Docker for dev
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Container on azure
Container on azureContainer on azure
Container on azure
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using Docker
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
 
Application Deployment on Openstack
Application Deployment on OpenstackApplication Deployment on Openstack
Application Deployment on Openstack
 
Docker
DockerDocker
Docker
 
Demystifying Docker101
Demystifying Docker101Demystifying Docker101
Demystifying Docker101
 
Demystifying Docker
Demystifying DockerDemystifying Docker
Demystifying Docker
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel Palstra
 
Cont0519
Cont0519Cont0519
Cont0519
 
20170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 201720170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 2017
 

Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main

  • 2. Simple microservice infrastructure, built for developers. Currently in free Alpha Looking for feedback http://giantswarm.io/ W e’re hiring
  • 3. Agenda 1) Docker Intro ● Why are we so excited? ● What is Docker? ● Getting started 2) Docker Microservices
  • 4. Docker is an open-source project to easily create lightweight, portable, self- sufficient containers from any application.” “ Linux
  • 5. Why are we so excited?
  • 6. Installation My Mac Timo’s Linux Test Staging Cloud VM Bare Metal Rails Web Frontend ? ? ? ? ? ? Node.js API ? ? ? ? ? ? Background jobs ? ? ? ? ? ? MySQL ? ? ? ? ? ? Distributed DB ? ? ? ? ? ? Message Queue ? ? ? ? ? ?
  • 7. Reusable Containers My Mac Timo’s Linux Test Staging Cloud VM Bare Metal Rails Web Frontend Node.js API Background jobs MySQL Distributed DB Message Queue
  • 8. Speed Ships within ... Manual deployment takes ... Automated deployment takes ... Boots in ... Bare metal Days Hours Minutes Minutes Virtual machine Minutes Minutes Seconds < Minute Container Seconds Minutes Seconds Seconds
  • 9. Dev ⇔ DevOps - Separation of Concerns Dev: Inside the container ● my code ● my libraries ● my package manager ● my app ● my data Ops: Outside the container ● Logging ● Remote Access ● Network Configuration ● Monitoring
  • 12. Based on existing technologies ● Namespaces > Varying views on the system > to provide isolated environments > PID, NET, IPC, MNT, UTS, User ● CGroups > control resources for a group of processes > like CPU time, Memory, Network bandwidth, etc. ● Layered FS ● (LXC)
  • 13. Layered FS Base Image Image bootfs Image Writable Container Application Code NodeJS Nginx Ubuntu Cgroups, Namespaces, Device Mapper, Kernel
  • 14. But {insert some great UNIX here} has had this for years.”“
  • 15. Docker History ● Jan 2013: Initial commit ● September 2013: Redhat announces collaboration ● June 2014: Google announces engagement ● August 2014: VMWare announces Docker support ● February 2015: Microsoft announces Docker support ● April 2015: Docker raises $95 Million ● June 2015: Open Container Project announced
  • 16.
  • 17.
  • 18. Docker is awesome and here to stay.
  • 20. Installation ● Mac, Windows: Boot2Docker ● Ubuntu: $ sudo apt-get install docker.io
  • 21. Run Containers # run a command $ docker run busybox echo hello # run an interactive shell $ docker run -i -t busybox /bin/sh # run a Redis cache $ docker run -d redis
  • 22. A Node Script // server.js var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn'); }).listen(8080); console.log('Server running');
  • 23. Simple Dockerfile FROM ubuntu:latest RUN apt-get update RUN apt-get install -y nodejs ADD server.js . EXPOSE 8080 CMD ["/usr/bin/nodejs", "/server.js"]
  • 24. Build, Push, and Run # build the image $ docker build -t puja108/node . # push it to the registry $ docker push puja108/node # run it (on any host) $ docker run -d puja108/node
  • 27. ● Vagrant ● rbenv ● nodeenv ● virtualenv ● Laptop full of build tools and servers Your current setup?
  • 28. ● Contains Build Tools ○ Can also be a separate container ● One (or more) container(s) for each stack ○ Use Docker Compose ● Runs the same regardless on which host or in which environment ● Lightweight ○ Developer can actually have several environments open directly on her laptop Dev Containers
  • 30. Jenkins - Docker Hub Integration Jenkins - Docker Hub Integration
  • 32. Patterns for the Cloud Microservices Responsive Manifesto
  • 33. ● Microservice Architectures > Simple focussed services > Highly decoupled > Communicate over lightweight mechanisms > HTTP APIs & Message Queues > Polyglot (Language, Framework, Data Store) > Built to fail ● Immutable Infrastructures > Disposable components > Make your state explicit > Configure at run-time The Next Steps in Cloud Architecture
  • 34. Containers vs. VMs Container ● Lightweight layers above a shared kernel ● Single service or process ● New but promising technology ● Enable #GIFEE VM ● Complete (heavy) Virtual System ● Application(s) with several components ● Tried and trusted Technology
  • 35. Should I start with Docker?
  • 36. Yes!
  • 37. Containers are only 1% of your problem.”“ Kelsey Hightower, CoreOS
  • 38. Thanks for listening! Reach out: Puja Abbassi @puja108 @giantswarm
  • 39. Namespaces The pid namespace: Used for process isolation (PID: Process ID). The net namespace: Used for managing network interfaces (NET: Networking). The ipc namespace: Used for managing access to IPC resources (IPC: InterProcess Communication). The mnt namespace: Used for managing mount-points (MNT: Mount). The uts namespace: Used for isolating kernel and version identifiers. (UTS: Unix Timesharing System).
  • 40. CGroups Control group of processes. Share available hardware resources. Set up limits and constraints. E.g. limiting the memory available to a specific container.