Slide 1

Slide 1 text

[ chusiang@takaojs ~ ] $ cat .profile # 㲺Ռᗼ / chusiang.lai (at) gmail.com / http://note.drx.tw

Slide 2

Slide 2 text

橕ෝ㲺Ռᗼ • 4 ଙ犥Ӥ IT 妿涢牐 • 匍肬 DrSays IT ૡ纷䒍牐 • ܎ଙ犥Ӥጱ Docker ֵአ妿涢牐 • ෝ Docker Hub 獤Ձጱ Images物 • php7 • phpmyadmin • redis.dockerfile • gitbook • vim-and-vi-mode 2

Slide 3

Slide 3 text

墋䁭樄ত 3

Slide 4

Slide 4 text

Outline I. 獮ᒒૡ纷䒍ฎՋ讕牫 4

Slide 5

Slide 5 text

Outline I. 獮ᒒૡ纷䒍ฎՋ讕牫 II. 疩獈蒅硈玕਻瑊ጱঅ蒂ฎՋ讕牫 5

Slide 6

Slide 6 text

Outline I. 獮ᒒૡ纷䒍ฎՋ讕牫 II. 疩獈蒅硈玕਻瑊ጱঅ蒂ฎՋ讕牫 III. Docker ฎՋ讕牫 6

Slide 7

Slide 7 text

Outline I. 獮ᒒૡ纷䒍ฎՋ讕牫 II. 疩獈蒅硈玕਻瑊ጱঅ蒂ฎՋ讕牫 III. Docker ฎՋ讕牫 IV. ெ讕ਞ蕕 Docker牫 7

Slide 8

Slide 8 text

Outline I. 獮ᒒૡ纷䒍ฎՋ讕牫 II. 疩獈蒅硈玕਻瑊ጱঅ蒂ฎՋ讕牫 III. Docker ฎՋ讕牫 IV. ெ讕ਞ蕕 Docker牫 V. 12 ೗౮傶 Docker य़䒍牦 8

Slide 9

Slide 9 text

Outline I. 獮ᒒૡ纷䒍ฎՋ讕牫 II. 疩獈蒅硈玕਻瑊ጱঅ蒂ฎՋ讕牫 III. Docker ฎՋ讕牫 IV. ெ讕ਞ蕕 Docker牫 V. 12 ೗౮傶 Docker य़䒍牦 VI. Q & A 9

Slide 10

Slide 10 text

Ⅰ. 獮ᒒૡ纷䒍ฎՋ讕牫 10

Slide 11

Slide 11 text

獮ᒒૡ纷䒍ฎՋ讕牫 11 • ܈獌膢ྎ萬䰬䰬᮷ᥝ䨝ጱՈ牐 JavaScript jQuery RWD Git Sublime Text Vim HTML5 CSS Node.js JSON Firefox Safari Chrome IE Django PHP Laravel Skitch Python UI UX

Slide 12

Slide 12 text

Ⅱ. 疩獈蒅硈玕਻瑊ጱঅ蒂ฎՋ讕牫 12 ※ 戢物Docker 犋ฎᒫӞ㮆ڊ匍ጱ਻瑊 (container) ದ蔩牐

Slide 13

Slide 13 text

疩獈 Docker 蒅硈玕਻瑊牧 ౯㮉ݢ犥墋玕ᑏԻ֢禂窕纷牏 عᴻ᯿ୌच器ୌ戔ૡ纷牏 仂੝懯向क़ૡ֢牧ๅݢ犥 虏樄咳牏介手޾ྋୗ絑ह 篷翿矑敍牐 ṛ჈ԏ聅硢୽穉搴 - http://goo.gl/ZFjhT0 13

Slide 14

Slide 14 text

Ⅲ. Docker ฎՋ讕牫 14

Slide 15

Slide 15 text

Docker ਁᶎӤጱ఺௏ฎ嘨毣ૡՈ牐 15

Slide 16

Slide 16 text

ℂ 2014 ଙ樄ত牧Docker ᮷ฎ᯿ᥝ IT ଙ䨝Ӿ磧砋ಋ ጱ䣣֖ԏӞ牧膏 Docker 磪 橕ጱᄍ拻犖䁰䁰粁笕牐 Docker ጱ蜫蝧缋蚏牧犋ݝฎࢩ 傶 Container ದ蔩๜蛪牧ๅ᯿ ᥝጱ橕棎ฎ Docker ጱڊ匍牧 ୚粁ԧ IT 礍䯤ጱ碝虋ᶐ牐 iThome - http://goo.gl/lJPQLF 16

Slide 17

Slide 17 text

Docker ฎӞ㮆褸಑۱牏螀蝑޾ֵአ਻瑊ದ蔩㬵䁆ᤈ䛑አ纷ୗ 傶Ӟ蛪ጱ樄硯რত嘨䌕礯牐 17

Slide 18

Slide 18 text

Docker 傶Ջ讕䨝穉㯽翄 VM 斕ᰁ牫ࢩ傶੝᪒ԧ N 㮆ਠ碉ጱ Guest OS牐 Server Host OS Hypervisor Guest OS Guest OS Bins/Libs Bins/Libs App A App B VM 1 VM 2 Server Host OS Docker Engine Bins/Libs Bins/Libs App A App B Container 1 Container 2 18

Slide 19

Slide 19 text

Docker ฎெ讕螀֢ጱ牫 19 container container image image Docker Registry 1.ℂ Registry ӥ斉 image 2.ֵአ image ୌ缏
 container 5.Ӥ㯽 image ک Registry 4. 疥ୌᗝঅጱ
 container
 㱪ਂ౮ image 3. ୌᗝ Infrastructure

Slide 20

Slide 20 text

Docker ฎெ讕螀֢ጱ牫 20 container container image image Docker Registry 1.ℂ Registry ӥ斉 image 2.ֵአ image ୌ缏
 container 5.Ӥ㯽 image ک Registry 4. 疥ୌᗝঅጱ
 container
 㱪ਂ౮ image 3. ୌᗝ Infrastructure

Slide 21

Slide 21 text

Docker ฎெ讕螀֢ጱ牫 21 container container image image Docker Registry 1.ℂ Registry ӥ斉 image 2.ֵአ image ୌ缏
 container 5.Ӥ㯽 image ک Registry 4. 疥ୌᗝঅጱ
 container
 㱪ਂ౮ image 3. ୌᗝ Infrastructure

Slide 22

Slide 22 text

Docker ฎெ讕螀֢ጱ牫 22 container container image image Docker Registry 1.ℂ Registry ӥ斉 image 2.ֵአ image ୌ缏
 container 5.Ӥ㯽 image ک Registry 4. 疥ୌᗝঅጱ
 container
 㱪ਂ౮ image 3. ୌᗝ Infrastructure

Slide 23

Slide 23 text

Docker ฎெ讕螀֢ጱ牫 23 container container image image Docker Registry 1.ℂ Registry ӥ斉 image 2.ֵአ image ୌ缏
 container 5.Ӥ㯽 image ک Registry 4. 疥ୌᗝঅጱ
 container
 㱪ਂ౮ image 3. ୌᗝ Infrastructure

Slide 24

Slide 24 text

Ⅳ. ெ讕ਞ蕕 Docker牫 24

Slide 25

Slide 25 text

GNU/Linux 25 Windows macOS

Slide 26

Slide 26 text

ெ讕ࣁ Ubuntu ਞ蕕 Docker牫- http://goo.gl/klHIyP

Slide 27

Slide 27 text

ெ讕ࣁ macOS ਞ蕕 Docker牫- http://goo.gl/EcY2YL

Slide 28

Slide 28 text

ெ讕ࣁ Windows ਞ蕕 Docker牫- https://goo.gl/pVrGFZ

Slide 29

Slide 29 text

Ⅴ. 12 ೗౮傶 Docker य़䒍牦 29

Slide 30

Slide 30 text

Terminal and 30 Kitematic

Slide 31

Slide 31 text

Terminal and Kitematic

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

Ⅰ Ⅱ Ⅲ Lv1

Slide 34

Slide 34 text

ᒫ 1 ೗物玲஑碸猟䲆 (pull) 34 # docker pull [OPTIONS] NAME[:TAG|@DIGEST] $ docker pull chusiang/takaojs1607 Using default tag: latest latest: Pulling from chusiang/takaojs1607 20d99f5aec05: Already exists 72f7fcd433f8: Already exists 5dce81f870ab: Already exists a3ed95caeb02: Already exists 23f18164665f: Already exists 282006c4409e: Already exists 3472ef26cc6d: Already exists 16de7d488a57: Already exists a3ed95caeb02: Already exists 5783f1e0c823: Already exists ... Digest: sha256:ce3c8ed58945808496447b9237c3d1e014edebe5c3200901621d73458be9395c Status: Downloaded newer image for chusiang/takaojs1607:latest

Slide 35

Slide 35 text

ᒫ 2 ೗物ڜڊ๜秚碸猟䲆 (images) 35 # docker images [OPTIONS] [REPOSITORY[:TAG]] $ docker images REPOSITORY TAG MAGE ID CREATED SIZE chusiang/takaojs1607 latest 3ad250eb94d2 About an hour ago 1.307 GB takaojs1607 latest 94714eb3e147 2 hours ago 1.307 GB chusiang/gitbook latest 1aa2bbe894cb 8 days ago 696 MB debian latest 1b088884749b 2 weeks ago 125.1 MB centos centos6 6a77ab6655b9 3 weeks ago 194.6 MB ubuntu 14.04 8f1bd21bd25c 4 weeks ago 188 MB memcached latest 8e1d5f409061 7 weeks ago 132.2 MB ubuntu latest b72889fa879c 10 weeks ago 188 MB nginx latest eb4a127a1188 11 weeks ago 182.7 MB debian wheezy ddbdfa5a014a 12 weeks ago 84.89 MB hello-world latest 690ed74de00f 8 months ago 960 B docker/whalesay latest 6b362a9f73eb 13 months ago 247 MB

Slide 36

Slide 36 text

ᒫ 3 ೗物碝ୌ㪔珸㵕਻瑊 (run) 36 # docker run [OPTIONS] IMAGE [COMMAND] [ARG...] # - 3.1. ୌ缏਻瑊㪔珸㵕牧㪔翉ਧ秂伛蜍獈Ӥ牐 # $ docker run -it chusiang/takaojs1607 bash root@fff0cdc8035a:/tmp# exit exit # - 3.2. ֵአ daemon 秇ୗୌ缏਻瑊㪔珸㵕牐 # $ docker run -it -d chusiang/takaojs1607 tail -f /dev/null 473e79f71ed34c3a88cb1def191a241962357952b5c7627b5600... # - 3.3. ୌ缏਻瑊㪔珸㵕牧Ӭ䟑斉๜秚ፓ袅 (local ࣁ獮 container ࣁ盅)牐 # $ docker run -it -v ~/Downloads:/data chusiang/takaojs1607 bash root@cc0345c6ccda:/tmp# exit exit

Slide 37

Slide 37 text

Ⅳ Ⅴ Ⅵ Lv2 37

Slide 38

Slide 38 text

ᒫ 4 ೗物礚፡਻瑊ᤈ纷 (ps) zz 38 # docker ps [OPTIONS] # - 4.1. 礚፡૪珸㵕ጱ containers牐 # $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES fff0cdc8035a chusiang/takaojs1607 "tail -f /dev/null" 1 hours ago Up 1 hours cranky_bose # - 4.2. 礚፡ಅ磪ጱ containers牐 # # -a, --all Show all containers (default shows just running) # $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES fff0cdc8035a chusiang/takaojs1607 "bash" 1 hours ago Exited (0) 1 hours ago stoic_euler 473e79f71ed3 chusiang/takaojs1607 "tail -f /dev/null" 1 hours ago Up 1 hours cranky_bose

Slide 39

Slide 39 text

ᒫ 5 ೗物奰ྊ਻瑊 (stop) 39 # docker stop [OPTIONS] CONTAINER [CONTAINER...] $ docker stop 473e79f71ed3 473e79f71ed3 $ docker ps # docker start [OPTIONS] CONTAINER [CONTAINER...] $ docker start 473e79f71ed3 473e79f71ed3 $ docker ps ᒫ 6 ೗物珸አ਻瑊 (start)

Slide 40

Slide 40 text

Ⅶ Ⅸ Ⅷ Lv3 40

Slide 41

Slide 41 text

ᒫ 7 ೗物蝱獈਻瑊 (exec) 41 # docker exec [OPTIONS] CONTAINER COMMAND [ARG...] # 礚፡૪珸㵕ጱ containers牐 $ docker ps # 蝱獈 container牐 $ docker exec -it 473e79f71ed3 bash # ෝ container 獉蝱ᤈ砺֢牐 root@473e79f71ed3:/tmp# lsb_release -a > hello_world.txt # 櫝樄 container牐 root@473e79f71ed3:/tmp# exit

Slide 42

Slide 42 text

ᒫ 8 ೗物൉Ի image (commit) 42 # docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] $ docker ps $ docker commit 473e79f71ed3 takaojs1607 sha256:df58b57acb0f10cd8321fa9174becbb19d75463a63354cd11d43debd... $ docker ps # -a, --author string Author # -m, --message string Commit message # $ docker commit -m "൉Ի懱௳" -a "֢ᘏݷ圸" 473e79f71ed3 takaojs1607 sha256:5a2fd19723027fb305beb749ad5114775db8824d4d5d51d89bd04d01...

Slide 43

Slide 43 text

ᒫ 9 ೗物狕硬秂壆 (tag) 43 # docker tag IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG] # # ڜڊ匍磪ጱ image牐 $ docker images # 蝚螂 IMAGE ID 狕硬 tag牐 $ docker tag 5a2fd1972302 takaojs1607:1.0 $ docker images # 蝚螂 REPOSITORY ݷ圸狕硬 tag牐 $ docker tag takaojs1607 takaojs1607:1.1 $ docker images $ docker tag takaojs1607:latest takaojs1607:1.2 $ docker images

Slide 44

Slide 44 text

Ⅺ Ⅹ Ⅻ Lv4 44

Slide 45

Slide 45 text

ᒫ 10 ೗物ᑏᴻ image ޾ tag (rmi) 45 # docker rmi [OPTIONS] IMAGE [IMAGE...] # 萞ኧ IMAGE ID ᑏᴻ image牐 $ docker images $ docker rmi 473e79f71ed3 # ᑏᴻ tag牐 $ docker images $ docker rmi takaojs1607:1.2 $ docker image # 䔶ګᑏᴻ (۱珀磪਻瑊ྋࣁ䁆ᤈ)牐 $ docker run hello-world $ docker rmi -f hello-world

Slide 46

Slide 46 text

ᒫ 11 ೗物ᑏᴻ਻瑊 (rm) 46 # docker rm [OPTIONS] CONTAINER [CONTAINER...] $ docker ps -a # ݝᑏᴻ૪؊ྊጱ਻瑊牐 $ docker rm 473e79f71ed3 root@473e79f71ed3:/tmp# # 䔶ګᑏᴻ牐 $ docker rm -f 473e79f71ed3

Slide 47

Slide 47 text

ᒫ 12 ೗物Ӥ㯽 image (push) 47 # docker push NAME[:TAG] [OPTIONS] # # - 襑ጭ獈 Docker Registry ಍ݢֵአ牐 # - Docker Hub: / # - Private Docker Registry: / $ docker images $ docker tag 473e79f71ed3 /foo $ docker tag 473e79f71ed3 /foo # Ӥ㯽 image $ docker push foo $ docker push /foo

Slide 48

Slide 48 text

箛 ێ 疻 纈 Live Demo 48

Slide 49

Slide 49 text

https://hub.docker.com/r/chusiang/takaojs1607/

Slide 50

Slide 50 text

https://youtu.be/XqCt8gk9AdI

Slide 51

Slide 51 text

51

Slide 52

Slide 52 text

1/3 52

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

Q & A 瑥纔ೌ಑訤觬 54

Slide 55

Slide 55 text

ૡ珶๐率 55

Slide 56

Slide 56 text

56 http://苢࿜ፘ蝪.tw

Slide 57

Slide 57 text

DevOps Taiwan https://www.facebook.com/groups/DevOpsTaiwan/ https://devopstaiwan.slack.com/ https://gitter.im/DevOpsTW/

Slide 58

Slide 58 text

http://www.vim.tw

Slide 59

Slide 59 text

http://coscup.org

Slide 60

Slide 60 text

http://mopcon.org

Slide 61

Slide 61 text

㷢ᘍ෈糽 • Docker Overview - https://docs.docker.com/engine/understanding-docker/ • ̽Docker —— ℂ獈槹ک䋿擅̾ྋ誢Ӿ෈粚 | GitBook - https://goo.gl/RIN20W • chusiang/takaojs1607-docker-demo: docker demo for takaojs meetup | GitHub
 - https://github.com/chusiang/takaojs1607-docker-demo • selenium/standalone-chrome-debug | Docker Hub - https://goo.gl/hWDwVI • angular/angular-seed | GitHub - https://goo.gl/gWzUJp • start | npm Documentation - https://docs.npmjs.com/cli/start • 獮ᒒᛔ㵕玕介手ԏ Selenium docker 絑ह debug 瞲ܖ | 擽୽ Smlsun
 - http://blog.smlsun.com/2015/04/selenium-docker-debug.html • Docker च器Օ奧膏䋿䜗 - http://www.slideshare.net/appleboy/docker-61214768 61 Free

Slide 62

Slide 62 text

瑽粙㬵რ • Find & run the whalesay image | Docker Docs - https://goo.gl/NSQmjJ • 岄傀჈率胂犩磪褖獍ݪ-ṛᵜ჈率獤獍ݪ-๜჈膫膨ݱ觊玈率ૡ֢禂ᘏݷ袅 - http://goo.gl/lMOqhW • LCL shipments and container transportation | Flamingo shipping - http://goo.gl/Ouufei • Ի蝢蟂ṛᵜ჈率ੴ - ṛ჈ԏ聅 94 ଙଶᒫԲ䌵硢୽穉搴 - http://goo.gl/ZFjhT0 • Docker Containers and Kubernetes, Smart ecosystem solution to virtualize in the Cloud | Yasser Yassin - https://goo.gl/o8tUfx • Microsoft Announces Docker Command Line Interface for Windows Clients | 1800Pocket/PC - http://goo.gl/fsY1yR • Cloud Backup stew in Docker container? Check – Asigra • The Register - http://goo.gl/Zu955T • Apple Mac Logo Evolution With Apple Mac Startup Sound Evolution 3 - YouTube - https://goo.gl/rXa8Mo • File:Windows logo - 2006.svg - Wikipedia - https://goo.gl/c2zYDh • ᴫ袅Ӟ物޸犤礚扇 |̽Docker —— ℂ獈槹ک䋿擅̾ྋ誢Ӿ෈粚 - https://goo.gl/CVAzZe • How Docker Turbocharged Uber's Deployments | The New Stack - http://goo.gl/EIftQe • AngularJS Meets Salesforce1 - https://scottbcovert.github.io/angularjs-meets-salesforce1/#/2 • "Node.js Logo" Posters by th1341 | Redbubble - http://goo.gl/on0lYO • Now Hiring: QA Engineer w/ Selenium | Boyle Software - http://goo.gl/p3ZdNf 62

Slide 63

Slide 63 text

END