Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dockerを使ってみよう

 Dockerを使ってみよう

社内勉強会にて

5059d3f370ad7e1f4d8de4be79ae1a2c?s=128

rvirus0817

August 30, 2016
Tweet

Transcript

  1. ࿩୊ͷ%PDLFSΛ ࢖ͬͯΈΑ͏ (.0ΞυϚʔέςΟϯάΠϯϑϥ։ൃ෦ 3ZP"EBDIJ

  2. ΞδΣϯμ w ࣗݾ঺հ w %PDLFSͱ͸ w %PDLFSNBDIJOFͱ͸ w ࣮ࡍʹ.BDʹ%PDLFS؀ڥΛߏஙͯ͠ΈΔ w

    %PDLFSͷߏ੒ w ·ͱΊ
  3. ࣗݾ঺հ w ໊͋ͩ͸͋ͩͪΜɻࠓ೥Ͱࡀ "QQMF৴ऀ  w ߴߍ͸ࠃࡍܥͩͬͨͷͰ֎ࠃޠ͔͠΍ͬͯ·ͤΜ w ౦༸େֶ૯߹৘ใֶ෦ -JOVYΛ৮͔ͬͯΒαʔό؅ཧऀʹͳΓ͍ͨͱʜ

     w ΠϯϑϥΤϯδχΞͷܦݧ͸·ͩೋ೥͘Β͍ w ࣾ಺4&ͱ͔ύιίϯ௚͢࢓ࣄΛҰ೥͘Β͍ w ݸਓͷϒϩά͕݄ؒສ17ʹͳΓ·ͨ͠ ɾ㱼ɾ 
 ॳ৺ऀʹେ޷ධΞϦΨλΠ w ౔೔͸༑ਓͱษڧձ΍ͬͨΓɺαʔϏε࡞Ζ͏ͳͲͳͲ w Իָ͸)*1)01ͰΠϕϯτͱ͔΍ͬͯ·͢⇛ΤϯδχΞΆ͘ͳ͍ͱݴΘΕΔ
  4. ࣗ෼ͷΠϯϑϥ୲౰ w ʮ"LB/Fʯʮ,6%"/ʯΠϯϑϥ୲౰ BEDMPVEܥ w ςοΫϒϩάͷαʔόӡӦ w ੍࡞νʔϜͱҰॹʹαʔόߏங w γΣϧεΫϦϓτ໺࿠

    w جຊ࣌ؒԿ͔͋ͬͨΒରԠ͍ͯ͠·͢
  5. ෦ॺ಺ʹͯ ͜Μͳ੠͕ɾɾɾɾ

  6. ઌഐํ͕ w ։ൃ؀ڥ؆୯ʹ࡞Γ͍ͨΑͶɾɾɾ w ʮ%PDLFS͍͍Μ͡Όͳ͍Ͱ͔͢ʂʯ w ։ൃ؀ڥ࡞ͬͯΈ͕ͨ
 ΊΜͲ͍͘͞ɾɾɾ޻਺͔͚ͨ͘ͳ͍ʂ w ͏͓͓͓͓͓͓͓͓͓͓͓

    ɾ㱼ɾ
  7. %PDLFSͱ͸ w ΫδϥͰ͢ w -JOVYͷίϯςφܥٕज़Λར༻ͯ͠
 ΞϓϦέʔγϣϯͷϏϧυɺσϓϩΠɺ࣮ߦΛ ߦ͏ίϯςφ؅ཧιϑτ΢ΣΞ w (PݴޠͰ࡞ΒΕͯΔ

  8. ࠓ·ͰͷԾ૝؀ڥ w ϋΠύʔόΠβʔɺϗετܕɾɾɾ w 04ΛՔಇ͠ͳ͍ͱ͍͚ͳ͍ɺ͔͔࣌ؒΓ͗͢ w $16ɺϝϞϦɺσΟεΫͷϦιʔεফඅ͗͢͠ w ͡Ό͋%PDLFS࢖͏ͱͲ͏ͳΔͷ͔Ͷʂʁ

  9. ίϯςφWT7. w ڻ͘΄Ͳαʔόͷల։΍ىಈ͕ૣ͍ w Φʔόʔϔου͕ͳ͍ ෛՙ  w αʔόʹ༏͍͠ w

    %PDLFSΛ؆୯ʹ
 ݴ͏ͱ 

  10. ΍ͨΒܰͯ͘଎͍
 Πϯϑϥίϯςφٕज़

  11. ͦ͏͍͑͹Έͳ͞Μ
 ݕূ༻؀ڥͬͯͲ͏ͯ͠·͢ʁ
 
 ͨͿΜεςʔδϯάͱ͔
 ։ൃαʔόͱ͔͋Γ·͕͢ 
 ݁ہ͙͢յ͙ͯ͢͠࡞੒Ͱ͖Δ
 7BHSBOU͕ओྲྀ

  12. ͔ͭͯͷ.ZϩʔΧϧԾ૝؀ڥ w 7BHSBOUΛ׆༻ͨ͠ w ىಈ஗͘ͳ͍ʁ Φϫίʜ  w *1ࢦఆͯ͠ඃͬͯΔͱͳΜ͔Τϥʔى͖Δ w

    ͱΓ͋͑ͣ؅ཧ͕͠ʹ͍͘ w .BDͷಈ࡞͕ॏ͘ͳΔ⇛πϥΠ w Ϩγϐ͋Δ͚Ͳ౰ͯΔ·Ͱ͔͔࣌ؒΔ⇛ಈ͔ͳ͍ͱ͔ʜ
  13. .BDʹ%PDLFS
 ೖΕΕ͹͍͍ͷͰ͸ʂʁ

  14. ։ൃ༻ίϯςφ࡞ͬͪΌ ͑͹͍͍ͷͰ͸ʂʁ

  15. ؆୯ʹݕূ؀ڥ
 ࡞Γͨ͘ͳ͍Ͱ͔͢ʂʁ

  16. ΋͏͋ͳͨ͸ύοέʔδΛ ౰ͯͨΓ͢Δඞཁ͸ͳ͍ʂ

  17. ৽͍͠ϝϯόʔ͕དྷͨΒ
 ίϯςφΛμ΢ϯϩʔυͯ͠
 ىಈ͢Δ͚ͩʂ

  18. %PDLFSNBDIJOFͱ͸ w ڈ೥͘Β͍   w ؆୯ʹ%PDLFS؀ڥΛߏங͢Δ͜ͱ͕Ͱ͖Δ w .BDɺ"84ɺ7JSUVBMCPY্ɺ&49JͳͲ w

    ΋ͪΖΜ8JOEPXTʹ΋ରԠ
 
 

  19. %PDLFSNBDIJOFͷΠϝʔδ

  20. .BDͷத਎

  21. %PDLFSNBDIJOFΠϯετʔϧ w BEBDIJONBDCSFXJOTUBMMEPDLFS
 
 BEBDIJONBDDVSM-IUUQTHJUIVCDPN EPDLFSNBDIJOFSFMFBTFTEPXOMPBEW EPDLFSNBDIJOF@EBSXJOBNEVTSMPDBM CJOEPDLFSNBDIJOF
 
 BEBDIJONBDDINPE

    YVTSMPDBMCJO EPDLFSNBDIJOF
  22. %PDLFSϗετͷ࡞੒ w BEBDIJONBDEPDLFSNBDIJOFDSFBUFESJWFSWJSUVBMCPY UFTUEPDLFS w ˞WJSUVBMCPY͸ܥ͡Όͳ͍ͱΤϥʔग़·͢ɻ w ෼΋͔͔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ѻ͏ʹ͋ͨͬͯ w EPDLFSSVO
 ίϯςφىಈ w EPDLFSDPNNJUNlNFNPz*%
 .BD࠶ىಈޙফ͑·͢ ஫ҙ

  34. Ͱʂ
 ΦϦδφϧίϯςφΛ
 ΈΜͳʹ΋࢖ͬͯ΋Β͍ͨ ͘
 ͳ͍͔ʂʁ

  35. %PDLFS)VC w (JU)VCͷΑ͏ͳ΋ͷͰ
 ࣗ෼͕࡞ͬͨίϯςφΛQVTIͰ͖Δ w DMPOF͢Ε͹ɺ͙͢؀ڥ͕࢖༻Ͱ͖Δ

  36. ·ͱΊ w ΋͏গ͠ެࣜಡΜͰཧղ͍ͨ͠ͱ͜Ζ
 ·ͩ·ͩཧղෆ଍  w ίϯςφݸ࡞ͬͯىಈ͍ͯ͠·͕͢ɺ·ͬͨ͘ .BD͕ॏ͘ͳ͍ w .BDͷਓ͸ͥͻ%PDLFSNBDIJOFΛೖΕͯΈͯ͸ʁ

    w ࢀߟIUUQBEBDIJOTFSWFSPOOFUXPSEQSFTT Q
  37. ͝ਗ਼ௌ͋Γ͕ͱ͏͟͝ ͍·ͨ͠