Head first docker

19
Head First Docker head first means “simple”

Transcript of Head first docker

Page 1: Head first docker

Head First Dockerhead first means “simple”

Page 2: Head first docker

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

Page 3: Head first 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.

Page 4: Head first docker

VMs vs dockerThey are both containers for deploying services

Page 5: Head first docker

VMs vs dockerthey provide different level of

abstraction (isolation).

Page 6: Head first docker

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.

Page 7: Head first docker

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

Page 8: Head first docker

Manage complex infrastructure

and we usually develop with Mac, Windows, but deploy on Linux!

Page 9: Head first docker

Manage complex infrastructure

and we usually develop with Mac, Windows, but deploy on Linux!

Pain for devs and ops

Page 10: Head first docker

How docker helps

• Create an environment in 5 minutes (download).

Page 11: Head first docker

How docker helps

• Start playing with nodejs now

• docker images

Page 12: Head first docker

Manage multiple services

• docker-compose

• define your services

• create docker-compose.yml

Page 13: Head first docker

Work within a team

Thanks to ’s great work, we already have our internal docker cloud with a nice control panel.

Page 14: Head first docker

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

Page 15: Head first docker

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

Page 16: Head first docker

How we use docker

• Use case 1

• Setup Facebook phabricator (the code review platform)

• https://github.com/yesnault/docker-phabricator

Page 17: Head first docker

How we use docker

• Use case 2

• Our internal Continuous Delivery infrastructure for the international project.

• jenkins + docker plugin + internal registry

• pros and cons

Page 18: Head first docker

Materials

• Install on Mac:

• brew search docker

• https://www.docker.com/docker-toolbox

Page 19: Head first docker

• QA