SlideShare a Scribd company logo

Running Docker in Development & Production (DevSum 2015)

Ben Hall
Ben Hall
Ben HallStartup Founder, Developer, Tester, DevOps, Teaboy

Running Docker in Development & Production presented at DevSum 2015, Stockholm, 25th May 2015

Running Docker in Development & Production (DevSum 2015)

1 of 91
Download to read offline
Running Docker in Development & Production (DevSum 2015)
Who?
@Ben_Hall
Tech Support > Tester > Developer > Founder >
Freelancer
Agenda
• Introduction To Docker & Containers
• Dockerizing Dockerising Applications
• Docker As Development Environment
• Testing Containers
• Production
A Load Balanced
ASP.NET/NancyFX/Node.js Website
running inside Docker
https://www.dropbox.com/s/gbcifo094c9v8ar/nancy-lb-demo-optimised.gif?dl=0
WHAT ARE CONTAINERS?
Virtual Machine
https://www.docker.com/whatisdocker/
Ad

Recommended

Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Ben Hall
 
The How and Why of Windows containers
The How and Why of Windows containersThe How and Why of Windows containers
The How and Why of Windows containersBen Hall
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Ben Hall
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsBen Hall
 
Running .NET on Docker
Running .NET on DockerRunning .NET on Docker
Running .NET on DockerBen Hall
 
Lessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containersLessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containersBen Hall
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationBen Hall
 

More Related Content

What's hot

Lessons from running potentially malicious code inside containers
Lessons from running potentially malicious code inside containersLessons from running potentially malicious code inside containers
Lessons from running potentially malicious code inside containersBen Hall
 
Deploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersDeploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersBen Hall
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Composeraccoony
 
DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains  DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains Docker, Inc.
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachPROIDEA
 
手把手帶你學Docker 03042017
手把手帶你學Docker 03042017手把手帶你學Docker 03042017
手把手帶你學Docker 03042017Paul Chao
 
Docker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersDocker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersAnthony Chu
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with DockerYosh de Vos
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 applicationRoman Rodomansky
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOpsОмские ИТ-субботники
 
Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Paul Chao
 
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Running High Performance and Fault Tolerant Elasticsearch Clusters on DockerRunning High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Running High Performance and Fault Tolerant Elasticsearch Clusters on DockerSematext Group, Inc.
 
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and ChefScaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chefbridgetkromhout
 
Getting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and SymfonyGetting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and SymfonyAndré Rømcke
 
Docker orchestration v4
Docker orchestration v4Docker orchestration v4
Docker orchestration v4Hojin Kim
 
Docker security
Docker securityDocker security
Docker securityJanos Suto
 

What's hot (20)

Lessons from running potentially malicious code inside containers
Lessons from running potentially malicious code inside containersLessons from running potentially malicious code inside containers
Lessons from running potentially malicious code inside containers
 
Deploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows ContainersDeploying applications to Windows Server 2016 and Windows Containers
Deploying applications to Windows Server 2016 and Windows Containers
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains  DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
 
手把手帶你學Docker 03042017
手把手帶你學Docker 03042017手把手帶你學Docker 03042017
手把手帶你學Docker 03042017
 
Docker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersDocker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server Containers
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with Docker
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
 
Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Docker workshop 0507 Taichung
Docker workshop 0507 Taichung
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Running High Performance and Fault Tolerant Elasticsearch Clusters on DockerRunning High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
 
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and ChefScaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
 
Getting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and SymfonyGetting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and Symfony
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
Docker in practice
Docker in practiceDocker in practice
Docker in practice
 
Docker orchestration v4
Docker orchestration v4Docker orchestration v4
Docker orchestration v4
 
Docker security
Docker securityDocker security
Docker security
 

Viewers also liked

Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with KubernetesTips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with KubernetesBen Hall
 
What Developers Need To Know About Visual Design
What Developers Need To Know About Visual DesignWhat Developers Need To Know About Visual Design
What Developers Need To Know About Visual DesignBen Hall
 
Embracing Startup Life and learning to think The Startup Way
Embracing Startup Life and learning to think The Startup WayEmbracing Startup Life and learning to think The Startup Way
Embracing Startup Life and learning to think The Startup WayBen Hall
 
Learning to think "The Designer Way"
Learning to think "The Designer Way"Learning to think "The Designer Way"
Learning to think "The Designer Way"Ben Hall
 
Beginners Guide to Kontena
Beginners Guide to KontenaBeginners Guide to Kontena
Beginners Guide to KontenaLauri Nevala
 
Building High Availability Application with Docker
Building High Availability Application with DockerBuilding High Availability Application with Docker
Building High Availability Application with Dockernevalla
 
Visual studio 2017 Launch keynote - Afterworks@Noumea
Visual studio 2017 Launch keynote - Afterworks@NoumeaVisual studio 2017 Launch keynote - Afterworks@Noumea
Visual studio 2017 Launch keynote - Afterworks@NoumeaJulien Chable
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsBen Hall
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with KubernetesCarlos Sanchez
 

Viewers also liked (9)

Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with KubernetesTips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
 
What Developers Need To Know About Visual Design
What Developers Need To Know About Visual DesignWhat Developers Need To Know About Visual Design
What Developers Need To Know About Visual Design
 
Embracing Startup Life and learning to think The Startup Way
Embracing Startup Life and learning to think The Startup WayEmbracing Startup Life and learning to think The Startup Way
Embracing Startup Life and learning to think The Startup Way
 
Learning to think "The Designer Way"
Learning to think "The Designer Way"Learning to think "The Designer Way"
Learning to think "The Designer Way"
 
Beginners Guide to Kontena
Beginners Guide to KontenaBeginners Guide to Kontena
Beginners Guide to Kontena
 
Building High Availability Application with Docker
Building High Availability Application with DockerBuilding High Availability Application with Docker
Building High Availability Application with Docker
 
Visual studio 2017 Launch keynote - Afterworks@Noumea
Visual studio 2017 Launch keynote - Afterworks@NoumeaVisual studio 2017 Launch keynote - Afterworks@Noumea
Visual studio 2017 Launch keynote - Afterworks@Noumea
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 

Similar to Running Docker in Development & Production (DevSum 2015)

Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshopRuncy Oommen
 
時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇Philip Zheng
 
Docker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudDocker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudSamuel Chow
 
桃園市教育局Docker技術入門與實作
桃園市教育局Docker技術入門與實作桃園市教育局Docker技術入門與實作
桃園市教育局Docker技術入門與實作Philip Zheng
 
Láďa Prskavec: Docker.io
Láďa Prskavec: Docker.ioLáďa Prskavec: Docker.io
Láďa Prskavec: Docker.ioDevelcz
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peekmsyukor
 
Docker in Action
Docker in ActionDocker in Action
Docker in ActionAlper Kanat
 
手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇Philip Zheng
 
Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)Toby Griffiths
 
Docker & FieldAware
Docker & FieldAwareDocker & FieldAware
Docker & FieldAwareJakub Jarosz
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruDeploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruSwaminathan Vetri
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Developmentmsyukor
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windowsDocker, Inc.
 
Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday developmentJustyna Ilczuk
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班Philip Zheng
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班Paul Chao
 
Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014Pini Reznik
 

Similar to Running Docker in Development & Production (DevSum 2015) (20)

Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇時代在變 Docker 要會:台北 Docker 一日入門篇
時代在變 Docker 要會:台北 Docker 一日入門篇
 
Docker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudDocker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google Cloud
 
桃園市教育局Docker技術入門與實作
桃園市教育局Docker技術入門與實作桃園市教育局Docker技術入門與實作
桃園市教育局Docker技術入門與實作
 
Láďa Prskavec: Docker.io
Láďa Prskavec: Docker.ioLáďa Prskavec: Docker.io
Láďa Prskavec: Docker.io
 
Docker.io
Docker.ioDocker.io
Docker.io
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
 
手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇
 
Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)
 
Docker & FieldAware
Docker & FieldAwareDocker & FieldAware
Docker & FieldAware
 
Docker
DockerDocker
Docker
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruDeploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Development
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
 
Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday development
 
How to _docker
How to _dockerHow to _docker
How to _docker
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班
 
Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014
 

More from Ben Hall

The Art Of Documentation - NDC Porto 2022
The Art Of Documentation - NDC Porto 2022The Art Of Documentation - NDC Porto 2022
The Art Of Documentation - NDC Porto 2022Ben Hall
 
The Art Of Documentation for Open Source Projects
The Art Of Documentation for Open Source ProjectsThe Art Of Documentation for Open Source Projects
The Art Of Documentation for Open Source ProjectsBen Hall
 
Three Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside ContainersThree Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside ContainersBen Hall
 
Containers without docker
Containers without dockerContainers without docker
Containers without dockerBen Hall
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetesBen Hall
 
The Art of Documentation and Readme.md for Open Source Projects
The Art of Documentation and Readme.md for Open Source ProjectsThe Art of Documentation and Readme.md for Open Source Projects
The Art of Documentation and Readme.md for Open Source ProjectsBen Hall
 
How Secure Are Docker Containers?
How Secure Are Docker Containers?How Secure Are Docker Containers?
How Secure Are Docker Containers?Ben Hall
 
The Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud NativeThe Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud NativeBen Hall
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
The art of documentation and readme.md
The art of documentation and readme.mdThe art of documentation and readme.md
The art of documentation and readme.mdBen Hall
 
Experimenting and Learning Kubernetes and Tensorflow
Experimenting and Learning Kubernetes and TensorflowExperimenting and Learning Kubernetes and Tensorflow
Experimenting and Learning Kubernetes and TensorflowBen Hall
 
Learning Patterns for the Overworked Developer
Learning Patterns for the Overworked DeveloperLearning Patterns for the Overworked Developer
Learning Patterns for the Overworked DeveloperBen Hall
 
Implementing Google's Material Design Guidelines
Implementing Google's Material Design GuidelinesImplementing Google's Material Design Guidelines
Implementing Google's Material Design GuidelinesBen Hall
 
The Art Of Building Prototypes and MVPs
The Art Of Building Prototypes and MVPsThe Art Of Building Prototypes and MVPs
The Art Of Building Prototypes and MVPsBen Hall
 
Node.js Anti Patterns
Node.js Anti PatternsNode.js Anti Patterns
Node.js Anti PatternsBen Hall
 
What Designs Need To Know About Visual Design
What Designs Need To Know About Visual DesignWhat Designs Need To Know About Visual Design
What Designs Need To Know About Visual DesignBen Hall
 
Real World Lessons On The Anti-Patterns of Node.JS
Real World Lessons On The Anti-Patterns of Node.JSReal World Lessons On The Anti-Patterns of Node.JS
Real World Lessons On The Anti-Patterns of Node.JSBen Hall
 

More from Ben Hall (17)

The Art Of Documentation - NDC Porto 2022
The Art Of Documentation - NDC Porto 2022The Art Of Documentation - NDC Porto 2022
The Art Of Documentation - NDC Porto 2022
 
The Art Of Documentation for Open Source Projects
The Art Of Documentation for Open Source ProjectsThe Art Of Documentation for Open Source Projects
The Art Of Documentation for Open Source Projects
 
Three Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside ContainersThree Years of Lessons Running Potentially Malicious Code Inside Containers
Three Years of Lessons Running Potentially Malicious Code Inside Containers
 
Containers without docker
Containers without dockerContainers without docker
Containers without docker
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
The Art of Documentation and Readme.md for Open Source Projects
The Art of Documentation and Readme.md for Open Source ProjectsThe Art of Documentation and Readme.md for Open Source Projects
The Art of Documentation and Readme.md for Open Source Projects
 
How Secure Are Docker Containers?
How Secure Are Docker Containers?How Secure Are Docker Containers?
How Secure Are Docker Containers?
 
The Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud NativeThe Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud Native
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
The art of documentation and readme.md
The art of documentation and readme.mdThe art of documentation and readme.md
The art of documentation and readme.md
 
Experimenting and Learning Kubernetes and Tensorflow
Experimenting and Learning Kubernetes and TensorflowExperimenting and Learning Kubernetes and Tensorflow
Experimenting and Learning Kubernetes and Tensorflow
 
Learning Patterns for the Overworked Developer
Learning Patterns for the Overworked DeveloperLearning Patterns for the Overworked Developer
Learning Patterns for the Overworked Developer
 
Implementing Google's Material Design Guidelines
Implementing Google's Material Design GuidelinesImplementing Google's Material Design Guidelines
Implementing Google's Material Design Guidelines
 
The Art Of Building Prototypes and MVPs
The Art Of Building Prototypes and MVPsThe Art Of Building Prototypes and MVPs
The Art Of Building Prototypes and MVPs
 
Node.js Anti Patterns
Node.js Anti PatternsNode.js Anti Patterns
Node.js Anti Patterns
 
What Designs Need To Know About Visual Design
What Designs Need To Know About Visual DesignWhat Designs Need To Know About Visual Design
What Designs Need To Know About Visual Design
 
Real World Lessons On The Anti-Patterns of Node.JS
Real World Lessons On The Anti-Patterns of Node.JSReal World Lessons On The Anti-Patterns of Node.JS
Real World Lessons On The Anti-Patterns of Node.JS
 

Recently uploaded

Embracing Change - The Impact of Generative AI on Strategic Portfolio Management
Embracing Change - The Impact of Generative AI on Strategic Portfolio ManagementEmbracing Change - The Impact of Generative AI on Strategic Portfolio Management
Embracing Change - The Impact of Generative AI on Strategic Portfolio ManagementOnePlan Solutions
 
Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Asher Sterkin
 
SPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementSPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementISPMAIndia
 
Sql server types of joins with example.pptx
Sql server types of joins with example.pptxSql server types of joins with example.pptx
Sql server types of joins with example.pptxsameer gaikwad
 
maximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsmaximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsssuser82c38d
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)GDSCNiT
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriISPMAIndia
 
Self scaling Multi cloud nomad workloads
Self scaling Multi cloud nomad workloadsSelf scaling Multi cloud nomad workloads
Self scaling Multi cloud nomad workloadsBram Vogelaar
 
Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...
Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...
Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...Oleksandr Zaitsev
 
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdfAUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdfAutokey
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkTimothy Spann
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...confluent
 
P1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetP1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetMatthewTHawley
 
The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!ISPMAIndia
 
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...ISPMAIndia
 
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ..."Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...ISPMAIndia
 
Les02 Restricting and Sorting Data using SQL.ppt
Les02 Restricting and Sorting Data using SQL.pptLes02 Restricting and Sorting Data using SQL.ppt
Les02 Restricting and Sorting Data using SQL.pptDrZeeshanBhatti
 
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTSi-engage
 
Steps to Build a PWA with Odoo.pdf
Steps to Build a PWA with Odoo.pdfSteps to Build a PWA with Odoo.pdf
Steps to Build a PWA with Odoo.pdfayushinwizards
 

Recently uploaded (20)

Embracing Change - The Impact of Generative AI on Strategic Portfolio Management
Embracing Change - The Impact of Generative AI on Strategic Portfolio ManagementEmbracing Change - The Impact of Generative AI on Strategic Portfolio Management
Embracing Change - The Impact of Generative AI on Strategic Portfolio Management
 
Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024
 
Features of IETM Software -Code and Pixels
Features of IETM Software -Code and PixelsFeatures of IETM Software -Code and Pixels
Features of IETM Software -Code and Pixels
 
SPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementSPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product Management
 
Sql server types of joins with example.pptx
Sql server types of joins with example.pptxSql server types of joins with example.pptx
Sql server types of joins with example.pptx
 
maximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsmaximum subarray ppt for killing camp students
maximum subarray ppt for killing camp students
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit Bendigiri
 
Self scaling Multi cloud nomad workloads
Self scaling Multi cloud nomad workloadsSelf scaling Multi cloud nomad workloads
Self scaling Multi cloud nomad workloads
 
Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...
Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...
Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...
 
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdfAUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
 
P1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetP1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 Smartsheet
 
The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!
 
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
 
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ..."Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
 
Les02 Restricting and Sorting Data using SQL.ppt
Les02 Restricting and Sorting Data using SQL.pptLes02 Restricting and Sorting Data using SQL.ppt
Les02 Restricting and Sorting Data using SQL.ppt
 
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS
 
Steps to Build a PWA with Odoo.pdf
Steps to Build a PWA with Odoo.pdfSteps to Build a PWA with Odoo.pdf
Steps to Build a PWA with Odoo.pdf
 

Running Docker in Development & Production (DevSum 2015)

  • 2. Who? @Ben_Hall Tech Support > Tester > Developer > Founder > Freelancer
  • 3. Agenda • Introduction To Docker & Containers • Dockerizing Dockerising Applications • Docker As Development Environment • Testing Containers • Production
  • 4. A Load Balanced ASP.NET/NancyFX/Node.js Website running inside Docker https://www.dropbox.com/s/gbcifo094c9v8ar/nancy-lb-demo-optimised.gif?dl=0
  • 8. Container Own Process Space Own Network Interface Own Root Directories Sandboxed Like a lightweight VM. But it’s not a VM.
  • 9. Container Native CPU Native Memory Native IO No Pre-Allocation Instant On Zero Performance Overheard
  • 12. Build, Ship and Run Any App, Anywhere Docker - An open platform for distributed applications for developers and sysadmins.
  • 15. ElasticSearch Before Docker > curl -L -O http://download.elasticsearch.org/PATH/TO/VERSION.zip > unzip elasticsearch-$VERSION.zip > cd elasticsearch-$VERSION The only requirement for installing Elasticsearch is a recent version of Java. Preferably, you should install the latest version of the official Java from www.java.com. 1. Download the jre-8u40-macosx-x64.dmg file. 2. Review and agree to the terms of the license agreement before downloading the file. 3. Double-click the .dmg file to launch it 4. Double-click on the package icon to launch install Wizard 5. The Install Wizard displays the Welcome to Java installation screen. Click Next 6. Oracle has partnered with companies that offer various products. After ensuring the desired programs are selected, click the Next button to continue the installation. 7. After the installation has completed, a confirmation screen appears. Click Close to finish the installation process. > ./bin/elasticsearch
  • 17. > docker run -d #Run In Background dockerfile/elasticsearch #Image Name https://www.dropbox.com/s/fbe8briq6ayycrh/start-elastic.gif?dl=0
  • 18. > docker run -d -p 9200:9200 -p 9300:9300 #Bind Ports dockerfile/elasticsearch
  • 19. curl b2d:9200 ? > boot2docker ip 192.168.59.103 > echo “192.168.59.103 b2d” >> /private/etc/hosts > cat /private/etc/hosts 192.168.59.103 b2d for i in {49000..49900}; do VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port$i,tcp,,$i,,$i"; VBoxManage modifyvm "boot2docker-vm" --natpf1 "udp-port$i,udp,,$i,,$i"; done
  • 25. FROM FROM ubuntu:14.01 # Base Image FROM ubuntu:latest # Caution
  • 26. COPY / WORKDIR / RUN COPY . /src # Copy current directory into image WORKDIR /src # Set working directory RUN apt-get update # Run a shell command
  • 27. EXPOSE EXPOSE 3000 # Allow binding to port 3000 EXPOSE 7000-8000 # Expose range of ports
  • 28. CMD CMD ./bin/www # Default command when container starts
  • 29. Complete .NET/Mono Dockerfile FROM benhall/docker-mono COPY . /src WORKDIR /src RUN xbuild Nancy.Demo.Hosting.Docker.sln EXPOSE 8080 CMD ["mono", "src/bin/Nancy.Demo.Hosting.Docker.exe"]
  • 30. benhall/docker-mono Dockerfile FROM ubuntu:14.01 MAINTAINER Ben Hall "ben@benhall.me.uk" RUN apt-get update -qq && apt-get -yqq install mono-complete && apt-get -yqq clean
  • 31. > docker build #Build Image -t scrapbook/app:20150520 #Image Name:Tag . #Directory https://www.dropbox.com/s/k7h0tdu28160nil/scrapbook-node-build-optimised.gif?dl=0
  • 34. > cat .dockerignore #Ignore file in root all_the_passwords.txt .git/ node_modules/ bower_components/
  • 35. > docker run -it #Run In Foreground scrapbook/app:20150520 #Image Name:Tag
  • 36. > docker run -it -p 3000 #Bind Random Port to Port 3000 scrapbook/app:20150520
  • 37. > docker run -it -p 3000:3000 #Bind Known Port scrapbook/app:20150520
  • 38. > docker ps #List Running Processes -a #Include Stopped CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1e5b37b0a2bc scrapbook/app:20150520133000 "npm start" 4 minutes ago Up 4 minutes 0.0.0.0:49176->3000/tcp mad_fermi
  • 39. > docker logs # Stream logs 1e5b37b0a2bc # ContainerID
  • 40. > docker run -d -p 9200:9200 -p 9300:9300 --name es # Friendly Name dockerfile/elasticsearch > docker run –it –p 3000 --link es:elasticsearch # Link container:alias scrapbook/app:20150520 > cat /etc/hosts 172.17.0.79 elasticsearch > env HOSTNAME=2f3b959b13a0 ELASTICSEARCH_PORT=tcp://172.17.0.79:9200 ELASTICSEARCH_PORT_9200_TCP=tcp://172.17.0.79:9200 ELASTICSEARCH_PORT_9200_TCP_ADDR=172.17.0.79 ELASTICSEARCH_PORT_9200_TCP_PORT=9200 ELASTICSEARCH_PORT_9200_TCP_PROTO=tcp ELASTICSEARCH_NAME=/scrapbookv2_web_1/es NODE_ENV=production
  • 41. > docker run –it –p 3000 --link es:elasticsearch -e SQLSERVER=10.10.20.50 #Environment Variable scrapbook/app:20150520 > env SQLSERVER.10.10.20.50 HOSTNAME=2f3b959b13a0 ELASTICSEARCH_PORT=tcp://172.17.0.79:9200 ELASTICSEARCH_PORT_9200_TCP=tcp://172.17.0.79:9200 ELASTICSEARCH_PORT_9200_TCP_ADDR=172.17.0.79 ELASTICSEARCH_PORT_9200_TCP_PORT=9200 ELASTICSEARCH_PORT_9200_TCP_PROTO=tcp ELASTICSEARCH_NAME=/scrapbookv2_web_1/es NODE_ENV=production
  • 43. http://blog.benhall.me.uk/2015/05/using-make-to-manage-docker-image-creation/ > make build NAME = benhall/docker-make-demo default: build build: docker build -t $(NAME) . debug: docker run --rm -it $(NAME) /bin/bash run: docker run --rm $(NAME) push: docker push $(NAME) release: build push
  • 44. > cat docker-compose.yml web: # Container Name build: . # Build links: # Links - elasticsearch ports: # Ports - 3000 environment: # Environment VIRTUAL_HOST: 'app.joinscrapbook.com' NODE_ENV: 'production' elasticsearch: # 2nd Container Name # Use Image image: dockerfile/elasticsearch:latest ports: # Ports - 9200:9200
  • 45. > docker-compose up # Start containers –d # In background Recreating scrapbookv2_nginx_1... Recreating scrapbookv2_redis_1... Recreating scrapbookv2_db_1... Recreating scrapbookv2_elasticsearch_1... Recreating scrapbookv2_web_1… > docker-compose stop # Stop containers Stopping scrapbookv2_web_1... Stopping scrapbookv2_elasticsearch_1... Stopping scrapbookv2_db_1... Stopping scrapbookv2_redis_1... Stopping scrapbookv2_nginx_1...
  • 46. Sidekick Container For Testing > docker run –d # No need to bind ports --name es # Friendly Name dockerfile/elasticsearch > docker run –it --link es:es # Link Container:alias benhall/curl # Curl Image curl http://es:9200 # Ping service > echo $? # Exit Code 0 # Success
  • 47. Schema Management Containers > docker run –d # No need to bind ports --name es # Friendly Name dockerfile/elasticsearch > docker run –rm --link es:es # Link Container:alias myapp/schema:latest # Schema Image
  • 49. Tagging ubuntu 15.04 2427658c75a1 12 weeks ago 117.5 MB ubuntu vivid 2427658c75a1 12 weeks ago 117.5 MB ubuntu vivid-20150218 2427658c75a1 12 weeks ago 117.5 MB ubuntu 14.10 78949b1e1cfd 12 weeks ago 194.4 MB ubuntu utopic-20150211 78949b1e1cfd 12 weeks ago 194.4 MB ubuntu utopic 78949b1e1cfd 12 weeks ago 194.4 MB ubuntu latest 2d24f826cb16 12 weeks ago 188.3 MB ubuntu trusty 2d24f826cb16 12 weeks ago 188.3 MB ubuntu 14.04 2d24f826cb16 12 weeks ago 188.3 MB ubuntu 14.04.2 2d24f826cb16 12 weeks ago 188.3 MB ubuntu trusty-20150218.1 2d24f826cb16 12 weeks ago 188.3 MB ubuntu 12.04 1f80e9ca2ac3 12 weeks ago 131.5 MB ubuntu precise 1f80e9ca2ac3 12 weeks ago 131.5 MB ubuntu precise-20150212 1f80e9ca2ac3 12 weeks ago 131.5 MB ubuntu 12.04.5 1f80e9ca2ac3 12 weeks ago 131.5 MB ubuntu 14.04.1 5ba9dab47459 3 months ago 188.3 MB
  • 50. > docker push # Push Image To Remote Registry benhall/nancy-demo:latest # Image Name:Tag
  • 51. > docker export # Export Image to Tar containerid # Container ID > container.tar # Name of Tar
  • 52. > docker run -p 5000:5000 registry:2.0 # Docker Registry Container > docker push b2d:5000/aspnet:beta5
  • 53. Recap • Docker Client / Boot2docker • Docker Daemon • Docker Images • Docker Container • Docker Hub / Registry
  • 54. DOCKER AS A DEVELOPMENT ENVIRONMENT
  • 55. ASP.NET vNext DNX > cat Makefile restore: docker run -it -v /Users/ben/.dnx:/home/dev/.dnx -v $(shell pwd)/WebApplication:/app -w="/app" benhall/aspnet-vnext-npm dnu restore build: docker run -v /Users/ben/.dnx:/home/dev/.dnx -v $(shell pwd)/WebApplication:/app -w="/app" benhall/aspnet-vnext-npm dnu build run: docker run -it -v /Users/ben/.dnx:/home/dev/.dnx -v $(shell pwd)/WebApplication:/app -w="/app" -p 5001 benhall/aspnet-vnext-npm dnx . kestrel
  • 56. > docker run –it --name scrapbook-iojs # Name it for future -v $(pwd):/app -v $(pwd)/iojs:/app/node_modules # Move location -w="/app” # Set working directory --entrypoint /bin/bash # Override entrypoint iojs
  • 57. GoLang > cat Dockerfile FROM golang:onbuild > cat Makefile NAME = ocelotuproar/docker-outdated build: docker build -t $(NAME) . run: docker run --rm --name $(INSTANCE) $(NAME) > make build # Run Golang Compiler & Build container > make run # Run built application
  • 58. Run Unit Tests Inside Containers
  • 59. Run UI Inside Containers > docker run -d -p 4444:4444 --name selenium-hub selenium/hub:2.45.0 > docker run -d --link selenium-hub:hub selenium/node- chrome:2.45.0 > docker run -d --link selenium-hub:hub selenium/node- firefox:2.45.0
  • 60. Private NPM Repository https://github.com/BenHall/docker-local-npm-registry > docker run -d -v $(pwd)/config.yaml:/opt/sinopia/config.yaml -p 4873:4873 keyvanfatehi/sinopia:latest > npm set registry http://b2d:4873 > npm adduser --registry http://b2d:4873
  • 61. RStudio • docker run -d -p 8787:8787 rocker/rstudio
  • 63. > docker pull # Pull Image To Remote Registry benhall/nancy-demo:latest # Image Name:Tag Always include tag otherwise pulls everything
  • 64. > cat docker-compose.yml web: build: . links: - elasticsearch volumes: # Mount Directories Outside Container - /opt/docker/scrapbook/db:/usr/src/app/ocelite-db - /opt/docker/scrapbook/uploads:/usr/src/app/uploads - /opt/docker/scrapbook/tmp:/usr/src/app/tmp elasticsearch: image: dockerfile/elasticsearch:latest volumes: # Host:Container - /opt/docker/scrapbook_elasticsearch:/data Persisting Data
  • 66. Problematic Approach > docker run -d --name nginx_root --link blog_benhall-1:blog_benhall-1 --link scrapbook-1:scrapbook-1 --link scrapbook_web_1:scrapbook_web_1 --link brownbag_web_1:brownbag_web_1 -p 80:80 -v /opt/docker/nginx/www:/data -v /opt/docker/nginx/sites:/etc/nginx/sites-enab -v /opt/docker/nginx/logs:/var/log/nginx dockerfile/nginx
  • 67. Problems • Static link – /etc/hosts • Adding new website? Reboot everything • Requires nginx config for each site
  • 70. • VIRTUAL_HOST=my.container.com • -v /var/run/docker.sock:/tmp/docker.sock
  • 72. 1) Docker raises events when containers start / stop 2) Registrator listens to events adds the new container’s details into Consul 3) Consul links container’s IP / Ports to DNS names & discovery API > ping redis.service.consul 4) Nginx uses Consul API to write & load config
  • 73. A Load Balanced ASP.NET/NancyFX/Node.js Website running inside Docker https://www.dropbox.com/s/gbcifo094c9v8ar/nancy-lb-demo-optimised.gif?dl=0
  • 74. Installing In Production 'curl -sSL https://get.docker.com/ | sh'
  • 76. > docker run -d --restart=always # Restart if exits redis
  • 77. Ports > docker run –p 3000:3000 nodejs node.app > sudo apt-get install ufw && sudo ufw disable > sudo ufw default deny > sudo ufw allow 22 > sudo ufw allow 80 > sudo ufw enable Docker manages IPTables, ufw won’t block > echo "DOCKER_OPTS=”--iptables=false"" > /etc/default/docker > docker run –p 127.0.0.1:3000 nodejs node.app
  • 78. Memory / CPU Usage > docker run –m 128m –cpu 50 mysql Space Usage Linux cgroups… Bandwidth Usage > iptables -A OUTPUT -p tcp --sport 80 -m state -- state ESTABLISHED,RELATED -m quota –quota 1310720 -j ACCEPT
  • 79. Log Files 5.8M Mar 29 07:17 /var/lib/docker/containers/0e3bcd1 157M Mar 29 14:25 /var/lib/docker/containers/1922c7a 1.8M Mar 6 07:23 /var/lib/docker/containers/2774be7 32K Jan 14 16:18 /var/lib/docker/containers/38e7c4ae 183K Mar 17 10:00 /var/lib/docker/containers/4a207c6 955M Mar 29 14:25 /var/lib/docker/containers/5408f6a 1.3M Mar 6 10:17 /var/lib/docker/containers/6e41977 1.3M Mar 6 10:11 /var/lib/docker/containers/756f64b 71 Jan 28 11:50 /var/lib/docker/containers/b1a2d887e 509M Mar 29 14:25 /var/lib/docker/containers/c5784ce 16K Feb 2 18:26 /var/lib/docker/containers/daa45ceb 488K Mar 6 10:43 /var/lib/docker/containers/ec80d6a
  • 80. Handling Machine Name Changes • Couchbase • InfluxDB
  • 82. Docker and Microsoft Partnership
  • 83. SQL Server as a Container?
  • 85. Visual Studio as a Container?
  • 86. Docker as a Platform
  • 90. Only tool I use for deployment • Close gap between development and production • Everything is a container! • Running platforms like Logstash, ElasticSearch, Redis, EventStore, RavenDB, NancyFX etc? Consider containers for deployment.