Head first docker
-
Upload
han-qin -
Category
Technology
-
view
342 -
download
16
Transcript of Head first docker
Head First Dockerhead first means “simple”
Agenda• What is docker?
• Why docker?
• How we use docker? Where we are now
• case study: setup * environment quickly
• case study: Continuous Delivery with docker
What is docker?
• Lightweight containers that run processes in isolation
• Docker allows you to package an application with all of its dependencies into a standardized unit for software development.
VMs vs dockerThey are both containers for deploying services
VMs vs dockerthey provide different level of
abstraction (isolation).
What is docker?• is a container like VM.
• is lightweight without emulating the hardware and cpu instructions.
• provides a standard format called docker images.
• for reuse and large scale deployment.
Why docker?• We [always] want to build better softwares/services
• But complex environment is hard to setup
• there might be different languages and versions
• there might be different databases
• there might be different OSes
Manage complex infrastructure
and we usually develop with Mac, Windows, but deploy on Linux!
Manage complex infrastructure
and we usually develop with Mac, Windows, but deploy on Linux!
Pain for devs and ops
How docker helps
• Create an environment in 5 minutes (download).
How docker helps
• Start playing with nodejs now
• docker images
Manage multiple services
• docker-compose
• define your services
• create docker-compose.yml
Work within a team
Thanks to ’s great work, we already have our internal docker cloud with a nice control panel.
Create and share yours• [Preferred]Create your
Dockerfile, and share it like source code.
• build on top of our existing containers
• Create your docker image, and push it to our registry.
We built a jenkins-slave for running nodejs unit tests
Create and share yours• [Preferred]Create your
Dockerfile, and share it like source code.
• build on top of our existing containers
• Create your docker image, and push it to our registry.
• docker commit
We built a jenkins-slave for running nodejs unit tests
How we use docker
• Use case 1
• Setup Facebook phabricator (the code review platform)
• https://github.com/yesnault/docker-phabricator
How we use docker
• Use case 2
• Our internal Continuous Delivery infrastructure for the international project.
• jenkins + docker plugin + internal registry
• pros and cons
Materials
• Install on Mac:
• brew search docker
• https://www.docker.com/docker-toolbox
• QA