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

Dockerはじめの一歩 / The first step of Docker

Dockerはじめの一歩 / The first step of Docker

JFrog webinar

Fb025419ed38f98df595eb2eafc859f4?s=128

ihcomega56

April 22, 2021
Tweet

Transcript

  1. None
  2. 2 ࣗݾ঺հ Α͜ͳ "ZBOB:PLPUB • +'SPHͷ%FWFMPQFS"EWPDBUF • લ৬·Ͱ͸ओʹόοΫΤϯυͷ։ൃ ʢ4*FS ޿ࠂձࣾ

    ূ݊ελʔτΞοϓʣ • 4XJUDI༻ͷΧϥΦέ༻ϚΠΫΛങͬͨ !"#$$%&' (#)*+,%-.
  3.  ʮ͸͡ΊͷҰาʯγϦʔζ ಛ௃ • ಛఆͷٕज़ʹ͍ͭͯɺΠϥετ΍ྫ͑Λ࢖ͬͯઆ໌͠·͢ • ෺ࣄΛֶͿ࣌͸֓ཁ΍શମ૾Λ஌͔ͬͯΒਂງΓ͍ͨ͠೿ɺ Ͱ΋ࣗྗͰ࢝ΊΔͷ͕ۤख ࠳ંͪ͠Ό͏ ೿ʹΦεεϝͰ͢

    • ͱʹ͔ࣗ͘Β৮ͬͯಈ͔ͯ͠Έ͍ͨ೿ʹ͸෺଍Γͳ͍͔΋ʜ աڈ࡞ • ,VCFSOFUFT͸͡ΊͷҰา IUUQTTQFBLFSEFDLDPNJIDPNFHBUIFGJSTUTUFQPGLVCFSOFUFT • (JU (JU)VC(JU)VC"DUJPOT͸͡ΊͷҰา IUUQTTQFBLFSEFDLDPNJIDPNFHBUIFGJSTUTUFQPGHJUHJUIVCBOEHJUIVCBDUJPOT
  4.  ࠓ೔ͷςʔϚ͸%PDLFSೖ໳ʂ

  5.  %PDLFSΛ࢖͏ͨΊͷ ΠϝʔδΛ௫ΜͰཉ͍͠ʂ طʹ࢖͍ͬͯΔํ͸͓͞Β͍΍஌ࣝͷ੔ཧʹ

  6.  ͘͠ΈΛৄ͘͠ ԐͰ΋Θ͔Δίϯςφ IUUQTTQFBLFSEFDLDPNUTVZPBNPOLFZTHVJEFUPDPOUBJOFS /01 23456 789:;<

  7.  %PDLFSͱ͸ !"#$%

  8.  ίϯςφͱ͸ ιϑτ΢ΣΞͷίʔυͱґଘؔ܎Λ͢΂ͯύοέʔδԽ࣮͠ߦ؀ ڥ͔Βִ཭͢Δ͜ͱͰɺ͋ΒΏΔΠϯϑϥ্ͰΞϓϦέʔγϣϯ ͷૉૣ҆͘ఆ࣮ͨ͠ߦΛՄೳʹ͢Δ΋ͷ ࢀߟ IUUQTXXXEPDLFSDPNSFTPVSDFTXIBUDPOUBJOFS IUUQTXXXJCNDPNDMPVEMFBSODPOUBJOFSJ[BUJPO IUUQTDMPVEHPPHMFDPNDPOUBJOFST

  9.  ಥવͰ͕͢ɺ

  10.  ࠓ೔͔Β৽͍͠νʔϜͰ ࢓ࣄΛ͢Δ͜ͱʹͳͬͨͱ͠Α͏

  11.  ։ൃ؀ڥߏங͢ΔΑͶ ։ൃऀ͡Όͳ͍৔߹͸͝ΊΜͳ͍͞ ࢓ࣄʹඞཁͳ४උ΍ηοτΞοϓΛ Πϝʔδ͍ͯͩ͘͠͞

  12.  օ͞Μͷࢥ͏ ʮ։ൃ؀ڥߏஙʯ ͱ͸ʁ

  13.  ʮ͏ͪ%PDLFS࢖ͬͯ։ൃͯ͠Δ͔Β γϡοͱ؀ڥ࡞ͬͪΌͬͯʙʯ ͳͲͱݴΘΕͨΒ

  14.  ώϠοͱ͢Δʁ خ͘͠ͳΔʁ

  15.  %PDLFSͷͳ͍։ൃ؀ڥߏங ։ൃ ؤுΔͧ

  16.  %PDLFSͷͳ͍։ൃ؀ڥߏங ؀ڥߏங खॱͰ͢ ։ൃ ؤுΔͧ

  17.  %PDLFSͷͳ͍։ൃ؀ڥߏங ؀ڥߏங खॱͰ͢ ύ ο έ ʔ δ Ϛ

    ω ʔ δ ϟ ʔ Λ Π ϯ ε τ ʔ ϧ ͢ Δ *%&΍ ς Ω ε τ Τ σ Ο λ Λ Π ϯ ε τ ʔ ϧ ͢ Δ ݴ ޠ ͷ ։ ൃ Ω ο τ Λ Π ϯ ε τ ʔ ϧ ͢ Δ ઃ ఆ ϑ Ν Π ϧ Λ ॻ ͖ ׵ ͑ Δ σ ʔ λ ϕ ʔ ε Λ Π ϯ ε τ ʔ ϧ ͢ Δ σ ʔ λ ϕ ʔ ε ͷ ς ʔ ϒ ϧ ΍ Ϣ ʔ β ʔ Λ ༻ ҙ ͢ Δ ؾ ߹ ͍ Λ ೖ Ε Δ
  18.  %PDLFSͷͳ͍։ൃ؀ڥߏங Τϥʔ͕ ग़ͨ खॱॻ͕ ݹ͍ ྡͷਓͱ Կ͔ҧ͏ όʔδϣϯ ҧͬͨ

    ύ ο έ ʔ δ Ϛ ω ʔ δ ϟ ʔ Λ Π ϯ ε τ ʔ ϧ ͢ Δ *%&΍ ς Ω ε τ Τ σ Ο λ Λ Π ϯ ε τ ʔ ϧ ͢ Δ ݴ ޠ ͷ ։ ൃ Ω ο τ Λ Π ϯ ε τ ʔ ϧ ͢ Δ ઃ ఆ ϑ Ν Π ϧ Λ ॻ ͖ ׵ ͑ Δ σ ʔ λ ϕ ʔ ε Λ Π ϯ ε τ ʔ ϧ ͢ Δ σ ʔ λ ϕ ʔ ε ͷ ς ʔ ϒ ϧ ΍ Ϣ ʔ β ʔ Λ ༻ ҙ ͢ Δ ؾ ߹ ͍ Λ ೖ Ε Δ
  19.  %PDLFSͷͳ͍։ൃ؀ڥߏங ύ ο έ ʔ δ Ϛ ω ʔ

    δ ϟ ʔ Λ Π ϯ ε τ ʔ ϧ ͢ Δ *%&΍ ς Ω ε τ Τ σ Ο λ Λ Π ϯ ε τ ʔ ϧ ͢ Δ ݴ ޠ ͷ ։ ൃ Ω ο τ Λ Π ϯ ε τ ʔ ϧ ͢ Δ ઃ ఆ ϑ Ν Π ϧ Λ ॻ ͖ ׵ ͑ Δ σ ʔ λ ϕ ʔ ε Λ Π ϯ ε τ ʔ ϧ ͢ Δ σ ʔ λ ϕ ʔ ε ͷ ς ʔ ϒ ϧ ΍ Ϣ ʔ β ʔ Λ ༻ ҙ ͢ Δ ؾ ߹ ͍ Λ ೖ Ε Δ %PDLFS্Ͱಈ͔͢νϟϯεʂ
  20.  %PDLFSͷ͋Δ։ൃ؀ڥߏங %PDLFSΛ Π ϯ ε τ ʔ ϧ ͢

    Δ *%&΍ ς Ω ε τ Τ σ Ο λ Λ Π ϯ ε τ ʔ ϧ ͢ Δ %PDLFSΠ ϝ ʔ δ Λ औ ಘ ͢ Δ ؾ ߹ ͍ Λ ೖ Ε Δ ͜͏ͳΔ͔΋
  21. ͭͣͭΠϯετʔϧ͢Δ  ίϯςφಋೖલ ։ൃ؀ڥߏங 04 ݴޠ ύοέʔδ Ϛωʔδϟʔ σʔλϕʔε =>?6@

    AB;C9D EFGH
  22. ·ͱΊͯऔಘ͢Δ  ίϯςφಋೖޙ ։ൃ؀ڥߏங 04 ίϯςφΤϯδϯ ίϯςφ ݴޠ ύοέʔδ Ϛωʔδϟʔ

    σʔλϕʔε ίϯςφ
  23.  ۃ୺ͳ࿩ IJKLM NOPQR EFS43H ͜ΕͰ΋։ൃ؀ڥߏங͕ࡁΜ͡Ό͏ த਎͸෼͔ΒΜʂ 04 ίϯςφΤϯδϯ ίϯςφ

  24.  ίϯςφͱ͸ ιϑτ΢ΣΞͷίʔυͱґଘؔ܎Λ͢΂ͯύοέʔδԽ࣮͠ߦ؀ڥ͔Βִ ཭͢Δ͜ͱͰɺ͋ΒΏΔΠϯϑϥ্ͰΞϓϦέʔγϣϯͷૉૣ҆͘ఆͨ͠ ࣮ߦΛՄೳʹ͢Δ΋ͷ ࠶ܝ ͭ·Γ • ඞཁͳΞϓϦέʔγϣϯ ύοέʔδϚωʔδϟʔɺݴޠɺσʔ

    λϕʔεͳͲ ͱͦͷઃఆΛͻͱ·ͱΊʹͯ͠ • ಈ͔͍ͨ͠Πϯϑϥ ؀ڥߏஙͷ৔߹ɺ։ൃ͢ΔਓͷϚγϯ ্ Ͱ͙͢ʹ࣮ߦͰ͖Δ
  25.  ίϯςφͷϝϦοτ • ؆୯ͳखॱͰ࣮ݱ͍ͨ͠؀ڥΛ࡞੒Ͱ͖Δ • ಉ͡ઃఆͰಉ͡؀ڥΛԿ౓Ͱ΋࡞੒Ͱ͖ΔͷͰ • ϝϯόʔͷ૿һʹରԠ͠΍͍͢ • ؀ڥ͝ͱʹ݁Ռ͕ҟͳͬͯ͠·͏ͷΛආ͚ΒΕΔ

    • ઃఆͨ͠಺༰͕ͦͷ··࣮ݱ͞ΕΔͷͰɺखॱॻͱҧ͏͜ͱʹ ೰·͞ΕΔՄೳੑ͸௿͘ͳΔ
  26.  ΋ͪΖΜ؀ڥߏங͕ ָʹͳΔ͚ͩ͡Όͳ͍

  27.  ผͷϝϦοτΛ஌ΔͨΊʹ ؆୯ͳྺ࢙ͷ࿩Λʜ

  28.  ͔ͭͯͷ։ൃ • ͭͷ ෺ཧ αʔόʔ্Ͱෳ਺ͷΞϓϦέʔγϣϯΛՔಇͤ͞Δ • ಉ͡؀ڥͰಈ͘ΞϓϦέʔγϣϯಉ͕࢜ӨڹΛ༩͑߹ͬͨΓɺ ϦιʔεΛୣ͍߹ͬͨΓͯ͠͠·͏ 04

    ΞϓϦέʔ γϣϯ ΞϓϦέʔ γϣϯ ΞϓϦέʔ γϣϯ αʔόʔ
  29.  Ծ૝Ϛγϯͷ୆಄ • Ծ૝Խιϑτ΢ΣΞΛ༻͍ͯɺ୆ͷαʔόʔʹෳ਺ͷԾ૝త ͳαʔόʔ Ծ૝Ϛγϯ Λߏங͢Δ • Ծ૝Ϛγϯຖʹ؀ڥ 04ɺϛυϧ΢ΣΞɺΞϓϦέʔγϣϯ

    ͕෼཭Ͱ͖ɺ෺ཧϚγϯ୆ʹΑΔӡ༻ΑΓϝϦοτ͕େ͖͍ ͨΊਁಁͨ͠ • 04ͷΠϯετʔϧ΍ىಈ͕ඞཁͳ෼ɺϋʔυ΢ΣΞϦιʔε ΍࣌ؒΛ ൺֱత ଟ͘ཁ͢Δ Θͨ͠͸ ୆ ιϑτ΢ΣΞͷྗ ·ΔͰ ୆ʂ ྫ αʔόʔͷ Ծ૝Խ
  30. • ίϯςφͰ࣮ݱ͍ͯ͠Δͷ΋Ծ૝ԽͷҰछͰ͋Δ • αʔόʔΛԾ૝Խ͢Δͱϋʔυ΢ΣΞ͕ෳ਺͋Δ͔ͷΑ͏ʹ ݟ͑ΔͷͰɺ͜ΕΛʮϋʔυ΢ΣΞϨϕϧͷԾ૝ԽʯͱݺͿ • ίϯςφ͸ಉҰ04্ͰԾ૝ԽΛ࣮ݱ͢Δʮ04ϨϕϧͷԾ૝ Խʯʹ͋ͨΔ  ίϯςφʹΑΔԾ૝Խ

    ϗετ04 ίϯςφΤϯδϯ ίϯςφ ΞϓϦ ΞϓϦ ΞϓϦ ίϯςφ ΞϓϦ ΞϓϦ ϋΠύʔόΠβʔ 7. ΞϓϦ ΞϓϦ ΞϓϦ 7. ΞϓϦ ΞϓϦ ήετ04 ήετ04 ·ΔͰ ผʑͷ αʔόʔʂ ·ΔͰ ผʑͷ 04ʂ ϋʔυ΢ΣΞ Ϩϕϧͷ Ծ૝Խ 04Ϩϕϧͷ Ծ૝Խ αʔόʔ αʔόʔ ˞ॴҦʮϋΠύʔόΠβʔܕʯͷਤɻ04ͱઐ༻ιϑτΛ࢖͏ʮϗετܕʯ΋͋Δ
  31. • ϋʔυ΢ΣΞελοΫ΍04 ͷϑϧػೳ Λؚ·ͣɺΞϓϦ έʔγϣϯͱґଘؔ܎ͷΈΛύοέʔδԽ͢ΔͨΊ • ىಈ͕࣌ؒ୹͍ • ύοέʔδͷαΠζ͕খ͍͞ •

    ࢖༻͢Δϋʔυ΢ΣΞϦιʔε͕খ͍͞ ˠࡢࠓͷιϑτ΢ΣΞ։ൃͷτϨϯυͱϚον͢Δ • Ϋϥ΢υ • %FW0QT • $*$% • ϚΠΫϩαʔϏε ͳͲ  ίϯςφʹΑΔԾ૝ԽͷϝϦοτ TUV<
  32. • ෺ཧαʔόʔΛ௚઀࢖͏ͷʹൺ΂ΔͱύϑΥʔϚϯε͕௿Լ ͢Δ • ରԠ͍ͯ͠ͳ͍04΍ϓϥοτϑΥʔϜ্Ͱ͸࢖͑ͳ͍ • ͲΜͳΞϓϦέʔγϣϯͰ΋ίϯςφԽͰ͖ΔΘ͚Ͱ͸ͳ͍  ίϯςφʹΑΔԾ૝ԽͷσϝϦοτ W0X

    YZ[\9] ^_` SaKbcEa
  33.  %PDLFSͱ͸ • ίϯςφΛ࢖ͬͯΞϓϦέʔγϣϯͷ࡞੒΍औಘɺ഑ஔɺ࣮ߦ ͳͲΛߦ͏ͨΊͷϓϥοτϑΥʔϜɻίϯςφΤϯδϯͷͭ ͭ·ΓɺίϯςφΛ࢖͏ͨΊͷ΋ͷͩʂ • -JOVYɺ8JOEPXTɺ.BDͰ࢖͑Δ • Φʔϓϯιʔειϑτ΢ΣΞ

    • (Pݴޠ੡ • ೥ʹEPU$MPVE͕ࣾ։ൃ ͦͷޙ%PDLFSࣾʹ໊ࣾΛมߋ͠ɺ ࠓ΋%PDLFS͕ࣾ։ൃɺ؅ཧ͍ͯ͠Δ dBe\X fg1Ph5ij klmlnc] oG5pq
  34.  ͔͜͜Β͸ ந৅తͳίϯςφͷ࿩Ͱ͸ͳ͘ %PDLFSͷ࿩Λ͍ͯ͘͠Α

  35.  ΞϓϦέʔγϣϯΛ 04ͷ্Ͱ௚઀͡Όͳͯ͘ ίϯςφ্Ͱಈ͔ͤΔͬͯ ֶΜ͚ͩͲ

  36.  ͦΕΛ%PDLFSͰ͸Ͳ͏΍Δͷʁ

  37.  %PDLFSͷΞʔΩςΫνϟ • %PDLFSσʔϞϯ͕ίϯςφͷ؅ཧ΍࣮ߦΛߦ͏ • Ϣʔβʔ͸%PDLFSΫϥΠΞϯτͱ΍ΓͱΓ͢Δ͜ͱͰؒ઀తʹ σʔϞϯͰ΍Γ͍ͨ͜ͱΛ࣮ݱ͢Δ • ೔ʑͷ։ൃΛ͢Δ্ͰσʔϞϯͱΫϥΠΞϯτͷҧ͍͸͋·Γ ҙࣝ͠ͳ͍

    %PDLFS ΫϥΠΞϯτ %PDLFSσʔϞϯ ίϯ ςφ ίϯ ςφ ίϯ ςφ ίϚϯυΛ ࢖͏ %PDLFSΤϯδϯ
  38. • ίϯςφΛ࡞੒͢ΔͨΊͷ໋ྩ͕ೖͬͨύοέʔδ • طʹଘࡏ͢Δ΋ͷΛ࢖͏͜ͱ΋ɺ࡞Δ͜ͱ΋Ͱ͖Δ • Πϝʔδ͕࣮ߦঢ়ଶʹͳͬͨΠϯελϯε͕ίϯςφ  %PDLFSΠϝʔδ %PDLFS Πϝʔδ

    ࣮ߦ؀ڥͱͯ͠"MQJOF ܰྔͷ-JOVY Λ࢖ͬͯʂ +BWBͱ(SBEMFΛΠϯετʔϧͯ͠ʂ ࣮ߦϑΝΠϧ͸͜ͷσΟϨΫτϦʹ഑ஔͯ͠ʂ +BWBΞϓϦέʔγϣϯΛ࣮ߦͯ͠ʂ
  39.  ·ͣ͸طଘͷΠϝʔδΛ ࢖͏ํ๏Λ௫ΜͰ͍͜͏

  40.  ஫͜ͷࢿྉͰͷ%PDLFSίϚϯυͷѻ͍ํ • ͜ΕҎ߱ɺઆ໌ʹؔ࿈͢ΔίϚϯυΛ্هϑΥʔϚοτͰεϥΠυʹهࡌ ͠·͢ • ίϚϯυͷ໊લΛ঺հ͢ΔʹͱͲΊɺҾ਺΍ΦϓγϣϯͳͲΛৄ͘͠આ໌ ͢Δ͜ͱ͸ ΄ͱΜͲ ͠·ͤΜ

    • ࠓ೔͸ΠϝʔδΛ௫Ή͜ͱ͕໨తͰ͋ΔͨΊ • ίϚϯυͷ۩ମతͳ࢖͍ํ͸खΛಈ͔͞ͳ͍ͱ਎ʹ͔ͭͳ͍ͱߟ͑ΔͨΊ ίϯςφΛ࡞੒ɾ࣮ߦ͢Δ docker run
  41. ϥΠϒϥϦͷ%PDLFSΠϝʔδΛ࢖͏ • %PDLFS্Ͱಈ͘ΞϓϦέʔγϣϯͷ Πϝʔδ͕ͨ͘͞Μެ։͞Ε͍ͯΔ • ࠷΋Ұൠతͳެ։ઌ͕ʮ%PDLFS)VCʯͱ͍͏ϨδετϦ  طʹ͋Δ%PDLFSΠϝʔδΛ࢖͏ᶃ r+*s%&tuvwxX Ay9z1{|}6

    ~•€•GX‚ƒ„ …~•†‡zC†P ˆ•G‰ ίϯςφΛ࡞੒ɾ࣮ߦ͢Δ docker run σϑΥϧτ͸ϑΥΞάϥ΢ϯυ ࣮ߦɻόοΫάϥ΢ϯυʹ͢Δ ʹ͸EΦϓγϣϯΛ͚ͭΔ
  42. • %PDLFSΠϝʔδΛอ؅ɾ഑෍͢ΔͨΊͷج൫Λࢦ͢ • %PDLFS)VC΍ྨࣅͷαʔϏεΛ࢖༻ͨ͠ΓɺϓϥΠϕʔτͳ ϨδετϦΛߏஙͨ͠Γ͢Δ͜ͱ͕Ͱ͖Δ • docker run Λ࣮ߦ͢Δͱɺ·ͣϩʔΧϧ͔Β֘౰ΠϝʔδΛ ୳͠ɺͳ͚Ε͹ϨδετϦΑΓऔಘ͢Δ

     %PDLFSϨδετϦ
  43.  %PDLFSϨδετϦ %PDLFSΠϝʔδΛμ΢ϯϩʔυ͢Δ docker pull %PDLFSΠϝʔδΛΞοϓϩʔυ͢Δ docker push %PDLFSϨδετϦʹϩάΠϯ͢Δ docker

    login %PDLFSΠϝʔδΛݕࡧ͢Δ docker search
  44. ҎԼͷ͍ͣΕ͔ͰΠϝʔδΛಛఆ͢Δ • *% • Πϝʔδ໊<λά໊> • Πϝʔδ໊<!μΠδΣετ஋>  %PDLFSΠϝʔδͷಛఆ

  45. ౓࡞੒ͨ͠%PDLFSΠϝʔδΛผͷ؀ڥͰ࢖͏ • ςετ؀ڥͰ2"͕׬ྃͨ͠ΞϓϦέʔγϣϯΛຊ൪؀ڥʹ΋ σϓϩΠ͍ͨ͠ͱ͖ • ՔಇதͷΞϓϦέʔγϣϯʹ໰୊͕ݟ͔ͭͬͨͨΊҎલͷ όʔδϣϯʹ໭͍ͨ͠ͱ͖  طʹ͋Δ%PDLFSΠϝʔδΛ࢖͏ᶄ 4•6

    ŠSF1 ‹ŒMca ίϯςφΛ࡞੒ɾ࣮ߦ͢Δ docker run σϑΥϧτ͸ϑΥΞάϥ΢ϯυ ࣮ߦɻόοΫάϥ΢ϯυʹ͢Δ ʹ͸EΦϓγϣϯΛ͚ͭΔ
  46.  Α͘࢖͏ίϯςφͷૢ࡞ ίϯςφΛҰཡදࣔ͢Δ docker ps ࣮ߦ த ఀࢭ த ίϯςφΛఀࢭ͢Δ

    docker stop ίϯςφΛىಈ͢Δ docker start ࣮ߦதͷίϯςφ಺ͰίϚϯυΛ࣮ߦ͢Δ docker exec ίϯ ςφ ࣮ߦதͷίϯςφ಺ͷϩάΛग़ྗ͢Δ docker logs ίϯςφΛ࡟আ͢Δ docker rm ର৅͸ఀࢭதͷίϯςφɻ ಈ͍͍ͯΔ΋ͷΛࢭΊΔ࣌͸ GΦϓγϣϯΛ͚ͭΔ ͪΐͬͱ͓ͨ͠ࢼ͠΍ ௐࠪʹ࢖͏͜ͱ͕ଟ͍ ର৅͸࣮ߦதͷίϯςφɻ ࢭ·͍ͬͯΔ΋ͷ΋ݟΔ࣌͸ BΦϓγϣϯΛ͚ͭΔ ίϯςφ͔ΒΠϝʔδΛੜ੒͢Δ docker commit ೖ໳ॻ αΠτ ͰΑ͘࢖͏ͱ ॻ͔Ε͍ͯͨΓ͢Δ͕ɺ ͋·Γ࢖Θͳ͍ײ֮ʜ
  47.  Πϝʔδͷ࢖͍ํ͕ ͳΜͱͳ͘෼͔͖ͬͯͨʜʁ

  48.  ࣍͸Πϝʔδͷࣗ࡞ʹ௅ઓʂ

  49. • %PDLFSGJMFͱ͍͏ϑΝΠϧΛ࡞੒͢Δ • %PDLFSGJMF্ʹ࣮ݱ͍ͨ͜͠ͱΛهड़͠ɺϏϧυͱ͍͏࡞ۀΛ ߦ͏ͱ%PDLFSΠϝʔδ͕ੜ੒͞ΕΔ • طଘͷ%PDLFSΠϝʔδΛϕʔεͱ͠ɺͦΕΛΧελϚΠζ͢Δ ͷ͕Ұൠతͳ࡞ΓํͰ͋Δ  %PDLFSΠϝʔδΛ࡞Δ

    %PDLFSGJMF Ϗϧυ %PDLFS Πϝʔδ %PDLFSΠϝʔδΛϏϧυ͢Δ docker build
  50.  %PDLFSGJMFͷॻ͖ํ FROM nginx:latest COPY ./index.html /usr/share/nginx/html/index.html ඞͣϑΝΠϧ໊͸%PDLFSGJMFͱ͢Δ %PDLFS͕Ϗϧυ༻ϑΝΠϧΛ໊લͰ൑ผ ͢ΔͨΊ

    %PDLFSGJMFͰ࢖͑Δ ίϚϯυ r+*s%&•#Ž%‚ O•6•G‘’ “”Rj5 •–6‘GpP<
  51. • FROM ϕʔεͱͳΔΠϝʔδΛࢦఆ͢Δ • RUN Ϗϧυ࣌ʹίϯςφ಺ͰίϚϯυΛ࣮ߦ͢Δ • ENV ,FZ7BMVFܗࣜͰ؀ڥม਺Λࢦఆ͢Δ •

    ADD, COPY Πϝʔδ಺΁ϑΝΠϧΛίϐʔ͢Δ • CMD, ENTRYPOINT ίϯςφىಈ࣌ʹ࣮ߦ͢ΔίϚϯυ΍Ҿ਺Λ ͋ ࢦఆ͢Δ  جຊతͳ%PDLFSGJMFͷίϚϯυ r+*s%&6—˜G =d™Bš@‚ ›œ•˜p1 žŸ6‰ ¡3q
  52. • LABEL • EXPOSE • VOLUME • USER • WORKDIR

    • ARG • ONBUILD • STOPSIGNAL • HEALTHCHECK • SHELL  ͦͷଞͷ%PDLFSGJMFͷίϚϯυ ¢£5¤¥] ¦§EcEaq
  53. • ʮԿΛ࢖ͬͯͲΜͳ͜ͱΛͲΜͳ෩ʹ࣮ݱ͍͔ͨ͠ʯ͕໌֬ʹ ͳ͍ͬͯΕ͹ɺௐ΂ͳ͕Βهड़͍͚ͯ͠͹େৎ෉ʂ • จ๏͕ޡ͍ͬͯͨΒϏϧυ࣌ʹΤϥʔʹͳΔ͠ɺ࣮ߦͯ͠Έͯ ؒҧ͍ͬͯͨΒ௚ͤ͹ྑ͍ • %PDLFSͷίϚϯυ͕ࢦ͢΋ͷ͸৭ʑ͋ΔͷͰɺࣗ෼ͷதͰ෼ྨ ͯ͠ΈΔͱࠓԿ͍ͯ͠Δ͔෼͔Γ΍͍͢ •

    %PDLFSGJMF಺ʹॻ͘΋ͷ • ίϯςφΛૢ࡞͢Δ΋ͷ • ΠϝʔδΛૢ࡞͢Δ΋ͷ • ϦϙδτϦʹର͠ૢ࡞͢Δ΋ͷ  ίϚϯυͱฉ͘ͱ೉ͦ͠͏͚ͩͲ M¨‘©ª]P «¬6-®Gp’ C¯A°Bš U¯9PE±˜S ²³EFP yABX™´B‚ µh¶•‘SX] ·¸
  54. • ઃఆͷશମ૾΋ৄࡉ΋໌֬Ͱ෼͔Γ΍͍͢ • όʔδϣϯ؅ཧͰ͖Δ ΋ͪΖΜόʔδϣϯͷߦ͖དྷ΍ڞಉฤू ͕͠΍͘͢ͳΔ • ಺༰ΛγΣΞ͠΍͍͢ • ಉ͡ઃఆΛ࠶ݱͰ͖Δ

    • ώϡʔϚϯΤϥʔ͕ى͜Γʹ͍͘ ʮ*OGSBTUSVDUVSFBT$PEFʯ  ͳͥઃఆΛϑΝΠϧʹॻ͖ى͜͢ͷ͔ ¹º5S35 »¼œ‡½‡½ ˜GAy9z¾ ¿17ÀAD1 IJ‘XK<
  55. • ීஈ։ൃ͍ͯ͠ΔΞϓϦέʔγϣϯ΋%PDLFSΠϝʔδԽͰ͖Δ • ΞϓϦέʔγϣϯͷϏϧυ΍ɺϏϧυࡁΈͷΞϓϦέʔγϣϯ औಘΛ%PDLFSGJMFͰߦ͏Α͏ઃఆ͢Δ • $*$%ύΠϓϥΠϯΛ࢖ͬͯϏϧυ΍σϓϩΠ͢Δͱྑ͍ ޙड़  ࣗ࡞ͷΞϓϦέʔγϣϯΛ%PDLFS΁

  56.  %PDLFSΠϝʔδ͸ ࡞ͬͨΒͪΌΜͱ؅ཧ͠Α͏ʂ

  57.  खݩͷ੔ཧ • ஈʑϩʔΧϧʹΠϝʔδ͕ͨ·͍ͬͯ͘ͷͰ࣌ʑ֬ೝ͠Α͏ • ͍Βͳ͍΋ͷ͸࡟আ͠Α͏ %PDLFSΠϝʔδҰཡΛදࣔ͢Δ docker images %PDLFSΠϝʔδΛ࡟আ͢Δ

    docker rmi ‰4‘X Á’phFSG Ay9zaÂq
  58.  %PDLFSΠϝʔδ͸ઐ༻ϦϙδτϦʹอ؅ • ࡞੒ͨ͠Πϝʔδ͸ʮόΠφϦɾϦϙδτϦϚωʔδϟʔʯʹ อ؅͠ɺ͔ͦ͜ΒγΣΞ΍࠶ར༻Λ͢Δ • ಉ͡%PDLFSGJMFΛԿ౓΋Ϗϧυ͢ΔͷΛආ͚ ࣌ؒΛઅ໿Ͱ͖Δ • ඼࣭͕୲อ͞ΕͨΠϝʔδΛ࢖͍ճͤΔ

    औಘ͢Δ อ؅͢Δ
  59.  %PDLFSΠϝʔδ͸ઐ༻ϦϙδτϦʹอ؅ • औಘͨ͠Πϝʔδ΋ʮόΠφϦɾϦϙδτϦ Ϛωʔδϟʔʯʹอ؅͓ͯ͘͠ • Ωϟογϡͷ໾ׂΛՌͨ͢ • ߴ଎ʹऔಘͰ͖Δ •

    ֎෦ϦϙδτϦʹΞΫηε Ͱ͖ͳͯ͘΋औಘͰ͖Δ औಘͭͭ͠ อ؅͢Δ
  60.  %PDLFS)VCͷΞΫηεճ਺੍ݶʹ஫ҙ • ແྉϢʔβʔ͸Πϝʔδͷऔಘճ਺ʹ্ݶ͕͋Δ • ະೝূͷ৔߹ɺ࣌ؒͰϦΫΤετ·Ͱ • ແྉϢʔβʔͱͯ͠ೝূࡁΈͷ৔߹ɺ࣌ؒͰϦΫΤετ·Ͱ

  61.  %PDLFS)VCͷΞΫηεճ਺੍ݶʹ஫ҙ • ແྉϢʔβʔ͸Πϝʔδͷऔಘճ਺ʹ্ݶ͕͋Δ • ະೝূͷ৔߹ɺ࣌ؒͰϦΫΤετ·Ͱ • ແྉϢʔβʔͱͯ͠ೝূࡁΈͷ৔߹ɺ࣌ؒͰϦΫΤετ·Ͱ • ՝ۚ·ͨ͸+'SPH"SUJGBDUPSZ

    Ϋϥ΢υ൛ Λܦ༝͢Ε͹ɺ੍ݶ ͔Βղ์͞ΕΔʂ ÃÄ]P• ÅÆÇÈ ]P•G
  62.  ͜͜·ͰཧղͰ͖ͨΒ %PDLFSͱ࠷ۙͷٕज़τϨϯυͷ ਂ͍ؔ܎͕෼͔Δ͔΋ʂʁ

  63. • ࠓ΍Ϗδωεʹιϑτ΢ΣΞ͸ෆՄܽͰ͋Δ • Ձ஋͋Διϑτ΢ΣΞΛސ٬ʹૉૣ͘ಧ͚ΒΕͳ͍ͱউͯͳ͍ ͱ͍͏લఏͷ΋ͱ • ϦϦʔεαΠΫϧΛ୹͘͠සൟʹιϑτ΢ΣΞΛΞοϓσʔτ ͠Α͏ • ϑΟʔυόοΫϧʔϓΛͲΜͲΜճ͍ͯ͜͠͏

    ͱ͍͏ͷ͕ࡢࠓͷτϨϯυʹͳ͖ͬͯͨ  ιϑτ΢ΣΞͱϏδωε r%ÉÊËÌ5p °zÍAD •Î5p
  64.  ΋͏গ͠۩ମతͳ ٕज़΍ํ๏࿦Λ ݟ͍ͯ͜͏

  65. • ιϑτ΢ΣΞͷෳࡶԽɾڊେԽʹΑΓɺϞϊϦγοΫͳΞϓϦ έʔγϣϯͱͯ͠αʔϏεΛҭͯΔͷ͕೉͘͠ͳͬͨ • খ͞ͳαʔϏε܈Λ࿈ܞͤ͞ΔʮϚΠΫϩαʔϏεʯ͕૿͑ͯ ͖͍ͯΔ • ίϯςφ͸খ͞ͳ୯ҐͰ ΞϓϦέʔγϣϯΛύοέʔδԽ͠ ૉૣ্ཱͪ͛͘ΒΕΔͨΊ

    ϚΠΫϩαʔϏεͱ૬ੑ͕ྑ͍  ϚΠΫϩαʔϏεͱ%PDLFS ൃ஫୲౰ʂ ηʔϧ৘ใ ୲౰ʂ ΞΧ΢ϯτ ৘ใ୲౰ʂ ঎඼৘ใ ୲౰ʂ
  66. • $* ܧଓతΠϯςάϨʔγϣϯ ΍$% ܧଓతσϦόϦʔɺܧଓత σϓϩΠϝϯτ ͷߟ͑ํ͕ਁಁ͖ͯͨ͠ • ։ൃͨ͠ιʔείʔυΛ͙͢Ϛʔδͨ͠Γ഑෍΍σϓϩΠΛ ߦͬͨΓ͢Δ͜ͱͰɺϦϦʔεͷස౓޲্ɺෆ۩߹ͷૣظൃݟ

    ͳͲΛ໨ࢦ͢  $*$%ͱ%PDLFS
  67. 7$4 UFTU CVJME #3. TFSWFST EFQMPZ • ௨ৗɺࣗಈԽ͠ύΠϓϥΠϯΛߏங࣮ͯ͠ݱ͢Δ͕ɺ%PDLFSͷ खܰ͞΍࠶ݱੑɺ഑෍ͷ͠΍͢͞͸͜͜Ͱ΋໾ཱͭ 

    $*$%ͱ%PDLFS
  68. • ߴ଎ͳσϓϩΠ͕Ͱ͖Δ͜ͱɺϝϯςφϯεͷ͠΍͢͞ ͳͲʹ͓͍ͯΫϥ΢υͱ%PDLFS΋਌࿨ੑ͕ߴ͍ • ࡢࠓ͸ͲͷΫϥ΢υϕϯμʔ΋ίϯςφΞϓϦʹରԠ͓ͯ͠Γɺ εϜʔζʹσϓϩΠ͢ΔͨΊͷπʔϧ͕೔ʑਐԽ͍ͯ͠Δ  Ϋϥ΢υͱ%PDLFS "NB[PO&$4 &MBTUJD$POUBJOFS4FSWJDF

    (PPHMF $PNQVUF&OHJOF "[VSF$POUBJOFS *OTUBODFT ÏÐÑÒtÓÐÔ5X ÕÖ1×6 ØÙS ‰3]˜
  69.  ৽͍ٕ͠ज़͸ ಥવൃੜ͢ΔΘ͚Ͱ΋ ҙຯͳ͘ྲྀߦΔΘ͚Ͱ΋ͳ͍ʂ

  70.  ৭ʑษڧɾ࢖༻͍ͯ͘͠ͱ ͦΕͧΕͷͭͳ͕Γ͕ ݟ͑ͯ͘Δ

  71.  ;Γ͔͑Γ • %PDLFSͱ͸Կ͔ • ΞϓϦέʔγϣϯͱґଘؔ܎ΛύοέʔδԽ࣮ͯ͠ߦ͢Δʮίϯςφʯٕज़ͷͭ • ͳͥ%PDLFS͕ਓؾͳͷ͔ • ΞϓϦέʔγϣϯಉ࢜ͷׯব΍ΠϯϑϥͷԚછʹΑΔো֐ΛݮΒͤΔ

    • ઃఆΛϑΝΠϧ %PDLFSGJMF Ͱॻ͚ΔͷͰϝϯςφϯε͠΍͍͢ • ༷ʑͳ؀ڥͷ্Ͱಉ͡ΞϓϦέʔγϣϯΛ͙͢ʹߏஙͰ͖Δ • Ծ૝Խٕज़ͷதͰ͸ܰྔͰɺ͔ͭߴ଎ʹಈ࡞͢Δ ͜ΕΒʹೲಘ͠ɺ%PDLFSΛ࢖͍࢝ΊΔͨΊͷҰา͕౿Έग़ͤͯ ͍ͨΒࠓ೔͸0,ʂ ·ͩଞʹ΋ίϚϯυ΋ػೳ΋େྔʜগ֮ͣͭ͑͠Α͏
  72.  ࠓ೔͔ΒͰ͖ΔऔΓ૊Έ • ೔ʑͷνʔϜ։ൃ΍ӡ༻ ಛʹ؀ڥͷ༻ҙ΍σϓϩΠͳͲ Ͱ ࠔ͍ͬͯΔ͜ͱΛ୳ͯ͠ΈΑ͏ • पΓͷਓͱ࿩ͯ͠ΈΑ͏

  73.  એ఻ ʮΑ͜ͳͷ෦԰ʯΛΑΖ͓͘͠ئ͍͠·͢😉 D9DDÚ DDDq