Slide 1

Slide 1 text

DockerΛຊ൪Ͱ࢖ͬͯΈͯ෼͔ͬͨ͜ͱ PHPΧϯϑΝϨϯε෱Ԭ2017 *OOPWBUPS+BQBO*OD ෋ॴ྄ &OHJOFFS

Slide 2

Slide 2 text

͓஌Βͤ εϥΠυ͸SpeakerDeckʹΞοϓ͠·͕͢… ࡱӨ౳΋ࣗ༝ʹͯ͠௖͍ͯ໰୊͋Γ·ͤΜ !IBOIBO

Slide 3

Slide 3 text

ίϯςφʹڵຯ͋Γ·͔͢ʁ

Slide 4

Slide 4 text

໌Δͦ͏ͳະདྷ ೥ࠒ͔Βͣͬͱ্ঢ܏޲ʹ͋Δ

Slide 5

Slide 5 text

Ξϯέʔτ w։ൃͰίϯςφ %PDLFS Λ࢖͍ͬͯΔʁ wຊ൪ͰίϯςφΛӡ༻͍ͯ͠Δʁ

Slide 6

Slide 6 text

ࠓ೔͓࿩͢Δ͜ͱ ࢲ͸͜͏΍ͬͨΑʂͷ࿩Ͱ͢

Slide 7

Slide 7 text

ׂͱී௨ͷ1)1FSͰ΋ ΦϯϥΠϯυΩϡϝϯτͱॻ੶ΛཔΓʹ %PDLFSΛ࢖ͬͨ։ൃʙຊ൪·Ͱ Ͱ͖Δ࣌୅ʹͳΓ·ͨ͠

Slide 8

Slide 8 text

ࠓ೔͓࿩͢Δ͜ͱ ͜ΕͳΒࢲͰ΋ग़དྷͦ͏ͩͳʂ ͬͯࢥͬͯ͘ΕͨΒخ͍͠Ͱ͢ɻ

Slide 9

Slide 9 text

։ൃ εςʔδ ຊ൪ ӡ༻ ࠓίί

Slide 10

Slide 10 text

ԿΑΓ΋·ͣඞཁͳ͜ͱ

Slide 11

Slide 11 text

ίϯςφϨδετϦ ίϯςφ։ൃͷ த৺ɻ

Slide 12

Slide 12 text

ίϯςφϨδετϦ ໊લ ྉۚ ಛ௃ Docker Cloud ༗ྉ ݩTutum Gitlab ແྉ private repo΋OK ͨ·ʹམͪΔ quay.io ༗ྉ ൃԻ͸[ki:] ACS EC2࢖͏ͳΒແྉ awsίϚϯυͰ؆୯ೝূ GCP ༗ྉ CloudStorageͱωοτ ϫʔΫԼΓʹ՝ۚ ػೳ͸େࠩͳ͍ɻར༻͠΍͍͢ॴͰྑ͍ɻ

Slide 13

Slide 13 text

ຊ೔ͷ࠷ॏཁࣄ߲

Slide 14

Slide 14 text

EPDLFSͷഁյతมߋ w dWͰϏϧυͯ͠ϨδετϦʹQVTI w WdͰ͸QVMMग़དྷͳ͍ɻ IUUQEPDTEPDLFSKQFOHJOFCSFBLJOH@DIBOHFTIUNM

Slide 15

Slide 15 text

EPDLFSDPNQPTFͷόʔδϣϯ Compose Engine จ๏ ~1.6.x 1.09 v1 1.6.x~ 1.10 v2 1.6.x~ 1.12 v2.1 1.9.x~ 1.13~ v3 όʔδϣϯͱ࢖͑Δจ๏ͷؔ܎͕΍΍͍͜͠

Slide 16

Slide 16 text

ϨδετϦΛ༻ҙͨ͠ΒΞϓϦͷ४උ

Slide 17

Slide 17 text

ΞϓϦέʔγϣϯͷߏ੒ ΞϓϦɺϦϙδτϦɺ%PDLFSpMF͕ݪଇ WBHSBOU࢖ͬͨ։ൃͱײ֮ͱͯ͠͸ಉ͡

Slide 18

Slide 18 text

ΞϓϦέʔγϣϯͷߏ੒ %PDLFSpMFνϥݟ த਎͸టष͍

Slide 19

Slide 19 text

ΞϓϦέʔγϣϯͷߏ੒ ඞཁͳϛυϧ΢ΣΞ͸ DPNQPTFͰఆٛ

Slide 20

Slide 20 text

ΞϓϦέʔγϣϯͷߏ੒ EPDLFSDPNQPTFͷத਎ ࣗ෼ͷΞϓϦ͸CVJME طଘΠϝʔδ͸QVMM

Slide 21

Slide 21 text

ΞϓϦέʔγϣϯͷߏ੒ ͦͷଞͷϙΠϯτ wઃఆ৘ใ͸؀ڥม਺͔Β wωοτϫʔΫઃఆ΋ग़དྷΔ wDPNQPTFϑΝΠϧ͸ܧঝ΍JODMVEF͕Մೳ

Slide 22

Slide 22 text

Ξϯνύλʔϯ ίϯςφىಈ࣌ʹίϯςφͷத਎Λॻ׵ XFC্ʹɺ͜ͷखͷํ๏͕ྑ͘ॻ͍ͯ͋Δ wDPNQPTFSJOTUBMM wOQNJOTUBMM wHJUQVMM

Slide 23

Slide 23 text

ෳ਺ΞϓϦ։ൃͷ৔߹ ґଘΞϓϦ͸ϨδετϦܦ༝ͰQVMM ͜Ε͕ϨδετϦ͕࠷ॳʹඞཁͳཧ༝

Slide 24

Slide 24 text

Ξϯνύλʔϯ ϦϙδτϦͰ%PDLFSpMFΛूத؅ཧ $*ͮ͠Β͍͠ɺ؀ڥߏஙखॱ͕ෳࡶ

Slide 25

Slide 25 text

ࢀߟ৘ใ -BSBWFMTLFMUPO https://github.com/hanhan1978/docker-laravel54-skelton

Slide 26

Slide 26 text

ࢀߟ৘ใ EPDLFSGPSNBD஗͍໰୊ https://blog.hanhans.net/2017/05/23/docker-for-mac-slow/ ׬ᘳͱ͸ݴ͑ͳ͍͕ɺղফ͞Εͭͭ͋Δ

Slide 27

Slide 27 text

ࢀߟ৘ใ DPNQPTFSJOTUBMMͷΩϟογϡ https://blog.hanhans.net/2017/02/25/docker-cache-composer-install/

Slide 28

Slide 28 text

։ൃ εςʔδ ຊ൪ ӡ༻ ࠓίί

Slide 29

Slide 29 text

ίϯςφͷ࣮ߦ؀ڥΛ४උ ϚωʔδυɾαʔϏε ࣗલͰ४උ OR

Slide 30

Slide 30 text

ϚωʔδυɾαʔϏε (,&(PPHMF$POUBJOFS&OHJOF %PDLFS$MPVE4XBSN.PEF #&5"

Slide 31

Slide 31 text

ࣗલͰ४උ $PSF04 ,VCFSOFUFT .FTPT σϑΝΫτελϯμʔυɻུশ͸,4 ౷߹తͳίϯςφ࣮ߦ؀ڥͰϦιʔεϞχλ΋෇ଐ ࢲ͸࢖ͬͨ͜ͱͳ͍ɻ ͱΓ͋͑ͣ,4ͱྑ͘ൺֱ͞ΕͯΔɻ 4XBSN.PEFͰ࢖͍ͬͯΔྫ͸Կ͔݅ݟ͔͚ͨɻ ,4ΑΓ΋γϯϓϧ ˠ6QEBUF͕සൟ͗͢ΔͷͰࣗલӡ༻͸͓קΊ͠ͳ͍

Slide 32

Slide 32 text

ࣗ෼͕΍ͬͨ͜ͱ ,VCFSOFUFTXJUILVCFBXT "84Ͱ͖ͪΜͱ͓ۚΛ͔͚ΒΕΔͳΒ(PPE w"84্ʹࣗಈͰ,4Λઃஔ w$PSF04νʔϜ͕ϝϯς wઃఆมߋɺΠϯελϯε௥Ճɺߋ৽΋ίϚϯυҰൃ wNMBSHFYΈ͍ͨͳߏ੒͕ਪ঑

Slide 33

Slide 33 text

Ξϯνύλʔϯ ͋Δఔ౓ͷن໛͕ແ͍ͱ,4͸໪ମແ͍ɻ

Slide 34

Slide 34 text

ݸਓత͓קΊ %PDLFS$MPVEͷ4XBSN.PEF͸༷ࢠݟ (,&(PPHMF$POUBJOFS&OHJOF

Slide 35

Slide 35 text

։ൃ εςʔδ ຊ൪ ӡ༻ ࠓίί

Slide 36

Slide 36 text

όονδϣϒ ࣮ߦ؀ڥຖʹιϦϡʔγϣϯ͕ҟͳΔ ,VCFSOFUFT$SPO+PCT .FTPT$ISPOPT ະݕূ 4XBSN.PEFແ

Slide 37

Slide 37 text

࣮ߦ؀ڥඇґଘͷδϣϒ DSPOઐ༻ίϯςφ͔ΒXFCIPPLΛୟ͘ ͪΐͬͱ໘౗͚ͩͲɺ࣮ߦ؀ڥʹࠨӈ͞Εͳ͍

Slide 38

Slide 38 text

$* CI Engine Compose Circle CI 1.09 (1.12) ࣗྗಋೖ Travis CI 1.12.3 ࣗྗಋೖ Codeship 17.3 ࠷৽ Docker-Cloud 17.3 ࠷৽ Shippable 1.09 (beta 1.10) ࣗྗಋೖ πʔϧຖʹରԠঢ়گ͸ϚνϚν https://speakerdeck.com/hanhan1978/sok-dockerwoshi-tutaphpapurikai-fa-tocinituite

Slide 39

Slide 39 text

Ξϯνύλʔϯ $*͸ɺޙͰઃఆ͢Ε͹͍͍ DPNQPTFͷίϚϯυ͕Ұ෦ඇରԠͩͬͨΓ ಋೖ͸ࢥ͍௨Γʹ͍͔ͳ͍

Slide 40

Slide 40 text

$*ϑΝʔετ $*ͷߟ͑ํ ॳظஈ֊͔Β$*Λઃఆͯ͠ݒ೦Λ෷͏ʂ ଞͷਓͷઃఆΛਅࣅΔɾύΫΔ

Slide 41

Slide 41 text

͓קΊͷ$* 5SBWJT$* %PDLFS$MPVE $PEFTIJQ ຊՈɻ(JUIVC࿈ܞͱ͔͍͢͝؆୯ɻ 7FSTJPO௥ਵ͕ૣ͍ɻίϛϡχςΟʔ͕׆ൃɻ ͳΜ͔ͩΜͩ௵͕͠ޮ͘

Slide 42

Slide 42 text

ϩάܥ αʔόϩά ΞϓϦέʔγϣϯϩά qVFOUEίϯςφΛར༻ جຊతʹ͸ඪ४ग़ྗɻ Τϥʔ͸TMBDL΁ɻͦͷଞ͸ඪ४ग़ྗɻ EPDLFSMPHTίϚϯυͰࢀর͢ΔͷͰجຊ͸ඪ४ग़ྗ

Slide 43

Slide 43 text

৘ใͷΩϟονΞοϓ TMBDLνϟϯωϧ .-ొ࿥ %PDLFSXFFLMZ %PDLFS ,4ڞʹଘࡏ

Slide 44

Slide 44 text

৘ใͷΩϟονΞοϓ ͦͷिͷ࿩୊ͷهࣄ·ͱΊ

Slide 45

Slide 45 text

ͦΖͦΖ·ͱΊ·͢

Slide 46

Slide 46 text

νΣοΫϦετ ίϯςφϨδετϦΛ४උ ϦϙδτϦɺ̍ΞϓϦɺ%PDLFSpMF ىಈίϚϯυͰΰχϣΰχϣېࢭ ίϯςφͷ࣮ߦ؀ڥબఆ όονॲཧͷํܾࣜఆ $*πʔϧͷબఆઃఆ ϩάऩूઃఆ ΞϓϦέʔγϣϯͷΤϥʔ௨஌ ϦιʔεͷϞχλϦϯά

Slide 47

Slide 47 text

·ͩ·ͩམͱ݀͠͸ଟ͍

Slide 48

Slide 48 text

Ͱ΋ ࢥͬͨΑΓશવ҆ఆͯ͠·͢ʂ

Slide 49

Slide 49 text

ͦΖͦΖࢼ࣌͠Ͱ͢

Slide 50

Slide 50 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠