docker introduction

22
Docker Introduction ChengWei @ 得寬科技內部訓練

Upload: chen-cheng-wei

Post on 31-Jul-2015

115 views

Category:

Technology


2 download

TRANSCRIPT

Docker Introduction

ChengWei @ 得寬科技內部訓練

!

Cheng Wei Chen !

DevOps @ 得寬科技

www.docker.com

What is Docker ?

https://youtu.be/ZzQfxoMFH0U

What is Docker ?

https://youtu.be/ZzQfxoMFH0U

有空可以自己看

Virtual Machine Docker

Virtual Machine Docker

LXC

Virtual Machine Docker

佔用容量:大 佔用容量:小

啟動速度:慢 啟動速度:快

不負責任的並帶有偏見的比較法!小孩子不要學!

host可支撐數量 數個~數十個

host可支撐數量 數個~數百個

VMs vs Docker

‧Portability — Software packaged in containers can be moved and deployed more easily than a full Virtual Machine image

‧Startup speed — VMs need to boot the guest OS before they can do anything else. Containers start running your software almost instantly

‧Flexible composition — Containers are best used when each process in your stack runs in its own container, making it easier to compose flexible and robust platforms instead of monolithic servers

VMs vs Docker

From: What containers can do for you

圖片來自《Docker從入門到實踐》正體中文版 (https://www.gitbook.com/book/philipzheng/docker_practice/details)

圖片來自《Docker從入門到實踐》正體中文版 (https://www.gitbook.com/book/philipzheng/docker_practice/details)

映像檔

容器

倉庫

Dockerfile

http://gliderlabs.com/blog/2015/04/14/docker-events-explained/

Docker events

development!

Docker

Container

Container

Container

Container

!

Docker hub

Image

Image

Image

Image

!

Registry

commit, ship!

Docker

Container

Container

Container

Container

Image

Image

Image

Image

!

Registry

ship, run!

Staging

Container

Container

Container

Container

Image

Image

Image

Image

!

Registry

ship, run!

Production

Container

Container

Container

Container

Image

Image

Image

Image

!

Registry

Hybrid Cloud!

AWS

Container Image

!

GCE

Container

!

VPS

Container

Version Control!

Registry!

Testing

passed

failed

failed

passed

Image v1.0

Image v1.5

Image v1.9

Image v2.1

Version Control!

Registry!

Production

php 5.5

php 5.3

failed

passed

嘗試升級 卻程式異常

隨時重建舊版架構

Version Control!

Production!

Project (old)

Nginx

Mysql

php-fpm

!Project (new)

Nginx

Mysql

php-fpm

Redis

beanstalkd

elasticsearch5.2

5.5

1.4

5.5

5.7

1.7

Q & A

ChengWei @ 得寬科技內部訓練