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

PaaS DX by Cloud Native Buildpacks

disc99
June 20, 2020

PaaS DX by Cloud Native Buildpacks

Cloud Native Buildpacksによって何が変わるのかの話 #shinjukult

disc99

June 20, 2020
Tweet

More Decks by disc99

Other Decks in Technology

Transcript

  1. ࠓճͷςʔϚ   %PDLFSΛ࢖ͬͯ ͍Δ ΞϓϦέʔγϣϯ͕ ෳ਺͋Δ 1BB4
 ৔߹ʹΑͬͯ͸ 'BB4ͷ΄͏͕Ϛο

    ν͢Δ͔΋ ࠓճͷςʔϚ ୯ମͰ%PDLFSΛ࢖͏ ৔߹΋΋ͪΖΜ0, :FT /P /P :FT
  2. $/#Ͱ͖Δ͜ͱ w ιʔείʔυ͔Β௚઀ɺ0$*Πϝʔδͷ࡞੒ w 1BB4ϓϩόΠμʔ͕։ൃ͍ͯ͠Δ࠷దԽ͞Εͨ0$*ΠϝʔδϏϧ υɺઃఆͷར༻ w 0$*ΠϝʔδΧελϚΠζͷͨΊͷػೳ ࣗ૊৫ʹඞཁͳػೳ௥Ճ 

    w %PDLFSϨδετϦ΁ͷొ࿥   FH+BWBΞϓϦέʔγϣϯ %PDLFSͷϕετϓϥΫςΟεͷద༻ 4QSJOH#PPUͷϕετϓϥΫςΟεʹԊͬͨઃఆ +7.@0154ͷࣗಈઃఆ 00.࣌ͷࣗಈ,JMM
 ௥Ճͨ͠$"ͷLFZTUPSF௥Ճ
 ؀ڥม਺ʹΑΔ+.9ͷ༗ޮԽ
  3. Πϝʔδͷ࡞੒ QBDL $/#ͷ$-*πʔϧ ΠϯετʔϧࡁΈ   # PROJECT_DIRʹ͸DockerfileͳͲΠϝʔδ࡞੒༻ϑΝΠϧ͸ෆཁ $ cd

    ${PROJECT_DIR} $ pack build my/image-name --builder gcr.io/paketo-buildpacks/builder:base $ docker run -p 8080:8080 my/image-name
  4. σϑΥϧτϏϧμʔͷࢦఆ   # PROJECT_DIRʹ͸DockerfileͳͲΠϝʔδ࡞੒༻ϑΝΠϧ͸ෆཁ $ cd ${PROJECT_DIR} $ pack

    build my/image-name --builder gcr.io/paketo-buildpacks/builder:base $ docker run -p 8080:8080 my/image-name QBDL $/#ͷ$-*πʔϧ ΠϯετʔϧࡁΈ ಉ͡ϏϧμʔΛ࢖͏͜ͱ͕ଟ͍ͷͰσϑΥϧτʹͰ͖Δ QBDLTFUEFGBVMUCVJMEFS\#6*-%&3^ FHQBDLTFUEFGBVMUCVJMEFSHDSJPQBLFUPCVJMEQBDLTCVJMEFSCBTF
  5. ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w CVJMEFS͸CVJMEQBDLͷू߹

    ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔ৘ใΛ·ͱΊͨΠ ϝʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ w CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ   BQQJNBHF  $MPVE/BUJWF#VJMEQBDLT TPVSDF
  6. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔ৘ใΛ·ͱΊͨΠ ϝʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ w CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ   QBDL BQQJNBHF  TPVSDF
  7. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔ৘ใΛ·ͱΊͨΠ ϝʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ w CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ   QBDL BQQJNBHF  ௒ڧྗͳϏϧυεΫϦϓτɺ πʔϧͷू߹ମ TPVSDF
  8. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   QBDL BQQJNBHF  CVJMEJNBHF SVOJNBHF TPVSDF
  9. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEQBDL+BWB CVJMEQBDL/PEF CVJMEQBDL(P QBDL CVJMEQBDL(SBEMF BQQJNBHF  CVJMEJNBHF SVOJNBHF TPVSDF
  10. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEQBDL+BWB CVJMEQBDL/PEF CVJMEQBDL(P QBDL CVJMEQBDL(SBEMF BQQJNBHF  CVJMEJNBHF CVJMEQBDLຖʹUBS΍ΠϝʔδͳͲͰ εΫϦϓτ΍πʔϧΛύοέʔδϯά SVOJNBHF TPVSDF
  11. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF TPVSDF
  12. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF EFQFOEFODZ TPVSDF
  13. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF EFQFOEFODZ TPVSDF
  14. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF EFQFOEFODZ EFQFOEFODZ TPVSDF
  15. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF EFQFOEFODZ EFQFOEFODZ TPVSDF
  16. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF EFQFOEFODZ EFQFOEFODZ CVJMEQBDLͷର৅Ͱͳ͍৔߹͸ ಺෦ͷॲཧ͸࣮ߦ͞Εͳ͍
 FH+BWBͷΞϓϦέʔγϣϯͷ(Pͷ CVJMEQBDL͸࣮ߦ͞Εͳ͍ TPVSDF
  17. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF EFQFOEFODZ EFQFOEFODZ TPVSDF
  18. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF EFQFOEFODZ EFQFOEFODZ TPVSDF
  19. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF EFQFOEFODZ EFQFOEFODZ ʜ TPVSDF
  20. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF EFQFOEFODZ EFQFOEFODZ ʜ BQQ TPVSDF
  21. CVJMEFSJNBHF ࢓૊Έ w ιʔεͳͲ͔Β࣮ߦՄೳͳΞϓϦέʔγϣϯΛ࡞੒ w QMBUGPSN QBDL౳ ͔ΒCVJMEFSΛར༻࣮͠ߦՄೳΞϓϦ έʔγϣϯΠϝʔδΛੜ੒ w

    CVJMEJNBHF Ϗϧυ؀ڥ ͱSVOJNBHF ࣮ߦ؀ڥ ΛTUBDL ͱͯ͠ఆٛ w CVJMEFS͸CVJMEQBDLͷू߹ ͦͷͨΊCVJMEQBDLT ͱϏϧυ ༻ΠϝʔδͳͲɺϏϧυʹඞཁͱͳΔॲཧΛ·ͱΊͨύο έʔδ w CVJMEQBDL͸ΞϓϦέʔγϣϯ͔Βॲཧର৅͔Λ൑ఆ͠ɺ ର৅Ͱ͋Ε͹ඞཁϑΝΠϧͷΠϯετʔϧ΍ϏϧυΛ࣮ߦ
 ͦͷͨΊCVJMEQBDLΛ௥Ճ͢Δ͜ͱͰCVJMEFSͷػೳΛ֦ு Ͱ͖Δ w CVJMDQBDLͰ௥Ճ͞ΕͨϑΝΠϧ͸ΠϝʔδͷϨΠϠͱ͠ ͯ௥Ճ   ʜ CVJMEJNBHF CVJMEQBDL" CVJMEQBDL% CVJMEQBDL$ QBDL CVJMEQBDL# BQQJNBHF  SVOJNBHF EFQFOEFODZ EFQFOEFODZ ʜ BQQ TPVSDF ֤ϨΠϠʔ EFQFOEFODZ ͸Ωϟογϡ ͕ޮͨ͘Ίճ໨Ҏ߱͸ߴ଎ʹͳΔ
  22. CVJMEQBDLͷ࡞੒ w ܾΊΒΕͨϑΝΠϧߏ੒ w CJO$/#ͷ-JGFDZDMFͰݺͼग़͢ϑΝΠϧ܈ w EFUFDUΞϓϦέʔγϣϯ͕͜ͷCVJMEQBDLͷର৅ͳͷ͔ͷ൑ఆॲཧ
 FHCVJMEHSBEMFɺQBDLBHFKTPOͷଘࡏνΣοΫͳͲ w CVJMEΞϓϦέʔγϣϯ࣮ߦʹඞཁͳϏϧυ΍ඞཁͳϑΝΠϧͷ௥ՃɺΩϟο

    γϡ౳ͷॲཧ
 FHKSFͷɺCVJMEQBDL༻ͷϨΠϠʔ࡞੒ɺHSBEMFCVJMEͷ࣮ߦͳͲ w CVJMEQBDLϏϧυύοΫʹඞཁͳઃఆ৘ใ
 JE΍WFSTJPOɺTUBDLͳͲ w UBS΍ΠϝʔδͳͲʹύοέʔδϯάͯ͠഑෍͕Մೳ
 FHQBDLQBDLBHFCVJMENZCVJMEQBDLQBDLBHFDPOpHQBDLBHFUPNM   NZCVJMEQBDL EFUFDU CVJME @ CVJMEQBDLUPNM CJO @
  23. CVJMEQBDLͷ࡞੒ w ܾΊΒΕͨϑΝΠϧߏ੒ w CJO$/#ͷ-JGFDZDMFͰݺͼग़͢ϑΝΠϧ܈ w EFUFDUΞϓϦέʔγϣϯ͕͜ͷCVJMEQBDLͷର৅ͳͷ͔ͷ൑ఆॲཧ
 FHCVJMEHSBEMFɺQBDLBHFKTPOͷଘࡏνΣοΫͳͲ w CVJMEΞϓϦέʔγϣϯ࣮ߦʹඞཁͳϏϧυ΍ඞཁͳϑΝΠϧͷ௥ՃɺΩϟο

    γϡ౳ͷॲཧ
 FHKSFͷΠϯετʔϧɺCVJMEQBDL༻ϨΠϠʔ࡞੒ɺHSBEMFCVJMEͷ࣮ߦͳͲ w CVJMEQBDLUPNMύοΫʹඞཁͳઃఆ৘ใ
 JE΍WFSTJPOɺTUBDLͳͲ w UBS΍ΠϝʔδͳͲʹύοέʔδϯάͯ͠഑෍͕Մೳ
 FHQBDLQBDLBHFCVJMENZCVJMEQBDLQBDLBHFDPOpHQBDLBHFUPNM   NZCVJMEQBDL EFUFDU CVJME @ CVJMEQBDLUPNM CJO @
  24. CVJMEQBDLͷ࡞੒ w ܾΊΒΕͨϑΝΠϧߏ੒ w CJO$/#ͷ-JGFDZDMFͰݺͼग़͢ϑΝΠϧ܈ w EFUFDUΞϓϦέʔγϣϯ͕͜ͷCVJMEQBDLͷର৅ͳͷ͔ͷ൑ఆॲཧ
 FHCVJMEHSBEMFɺQBDLBHFKTPOɺ(FNpMFͷଘࡏνΣοΫͳͲ w CVJME࣮ߦʹඞཁͳϏϧυ΍ඞཁͳϑΝΠϧͷ௥ՃɺΩϟογϡ౳ͷॲཧ


    FHKSFͷΠϯετʔϧɺCVJMEQBDL༻ͷϨΠϠʔ࡞੒ɺHSBEMFCVJMEͷ࣮ߦͳ Ͳ w CVJMEQBDLUPNMϏϧυύοΫʹඞཁͳઃఆ৘ใ
 JE΍WFSTJPOɺTUBDLͳͲ w UBS΍ΠϝʔδͳͲʹύοέʔδϯάͯ͠഑෍͕Մೳ
 FHQBDLQBDLBHFCVJMENZCVJMEQBDLQBDLBHFDPOpHQBDLBHFUPNM   NZCVJMEQBDL EFUFDU CVJME @ CVJMEQBDLUPNM CJO @
  25. CVJMEQBDLͷ࡞੒ w ܾΊΒΕͨϑΝΠϧߏ੒ w CJO$/#ͷ-JGFDZDMFͰݺͼग़͢ϑΝΠϧ܈ w EFUFDUΞϓϦέʔγϣϯ͕͜ͷCVJMEQBDLͷର৅ͳͷ͔ͷ൑ఆॲཧ
 FHCVJMEHSBEMFɺQBDLBHFKTPOɺ(FNpMFͷଘࡏνΣοΫͳͲ w CVJMEΞϓϦέʔγϣϯ࣮ߦʹඞཁͳϏϧυ΍ඞཁͳϑΝΠϧͷ௥ՃɺΩϟο

    γϡ౳ͷॲཧ
 FHKSFͷɺCVJMEQBDL༻ͷϨΠϠʔ࡞੒ɺHSBEMFCVJMEͷ࣮ߦͳͲ w CVJMEQBDLUPNMϏϧυύοΫʹඞཁͳઃఆ৘ใ
 JE΍WFSTJPOɺTUBDLͳͲ w UBS΍ΠϝʔδͳͲʹύοέʔδϯάͯ͠഑෍͕Մೳ
 FHQBDLQBDLBHFCVJMENZCVJMEQBDLQBDLBHFDPOpHQBDLBHFUPNM   NZCVJMEQBDL EFUFDU CVJME @ CVJMEQBDLUPNM CJO @ #!/usr/bin/env bash set -eo pipefail if [[ ! -f Gemfile ]]; then exit 100 fi
  26. CVJMEQBDLͷ࡞੒ w ܾΊΒΕͨϑΝΠϧߏ੒ w CJO$/#ͷ-JGFDZDMFͰݺͼग़͢ϑΝΠϧ܈ w EFUFDUΞϓϦέʔγϣϯ͕͜ͷCVJMEQBDLͷର৅ͳͷ͔ͷ൑ఆॲཧ
 FHCVJMEHSBEMFɺQBDLBHFKTPOɺ(FNpMFͷଘࡏνΣοΫͳͲ w CVJMEΞϓϦέʔγϣϯ࣮ߦʹඞཁͳϏϧυ΍ඞཁͳϑΝΠϧͷ௥ՃɺΩϟο

    γϡ౳ͷॲཧ
 FHCVJMEͷ࣮ߦɺKSFͷΠϯετʔϧɺCVJMEQBDL༻ͷϨΠϠʔ࡞੒ͳͲ w CVJMEQBDLUPNMϏϧυύοΫʹඞཁͳઃఆ৘ใ
 JE΍WFSTJPOɺTUBDLͳͲ w UBS΍ΠϝʔδͳͲʹύοέʔδϯάͯ͠഑෍͕Մೳ
 FHQBDLQBDLBHFCVJMENZCVJMEQBDLQBDLBHFDPOpHQBDLBHFUPNM   NZCVJMEQBDL EFUFDU CVJME @ CVJMEQBDLUPNM CJO @
  27. CVJMEQBDLͷ࡞੒ w ܾΊΒΕͨϑΝΠϧߏ੒ w CJO$/#ͷ-JGFDZDMFͰݺͼग़͢ϑΝΠϧ܈ w EFUFDUΞϓϦέʔγϣϯ͕͜ͷCVJMEQBDLͷର৅ͳͷ͔ͷ൑ఆॲཧ
 FHCVJMEHSBEMFɺQBDLBHFKTPOɺ(FNpMFͷଘࡏνΣοΫͳͲ w CVJMEΞϓϦέʔγϣϯ࣮ߦʹඞཁͳϏϧυ΍ඞཁͳϑΝΠϧͷ௥ՃɺΩϟο

    γϡ౳ͷॲཧ
 FHCVJMEͷ࣮ߦɺKSFͷΠϯετʔϧɺCVJMEQBDL༻ͷϨΠϠʔ࡞੒ͳͲ w CVJMEQBDLUPNMϏϧυύοΫʹඞཁͳઃఆ৘ใ
 JE΍WFSTJPOɺTUBDLͳͲ w UBS΍ΠϝʔδͳͲʹύοέʔδϯάͯ͠഑෍͕Մೳ
 FHQBDLQBDLBHFCVJMENZCVJMEQBDLQBDLBHFDPOpHQBDLBHFUPNM   NZCVJMEQBDL EFUFDU CVJME @ CVJMEQBDLUPNM CJO @ #!/usr/bin/env bash set -eo pipefail # 1. GET ARGS layersdir=$1 # 2. DOWNLOAD RUBY rubylayer="$layersdir"/ruby mkdir -p "$rubylayer" ruby_url=https://.../heroku-18/ruby-2.5.1.tgz wget -q -O - "$ruby_url" | tar -xzf - -C "$rubylayer" # 3. MAKE RUBY AVAILABLE DURING LAUNCH echo -e 'launch = true' > "$rubylayer.toml" # 4. MAKE RUBY AVAILABLE TO THIS SCRIPT export PATH=“$rubylayer"/bin:$PATH ... # 5. INSTALL BUNDLER gem install bundler --no-ri --no-rdoc # 6. INSTALL GEMS bundle install
  28. CVJMEQBDLͷ࡞੒ w ܾΊΒΕͨϑΝΠϧߏ੒ w CJO$/#ͷ-JGFDZDMFͰݺͼग़͢ϑΝΠϧ܈ w EFUFDUΞϓϦέʔγϣϯ͕͜ͷCVJMEQBDLͷର৅ͳͷ͔ͷ൑ఆॲཧ
 FHCVJMEHSBEMFɺQBDLBHFKTPOɺ(FNpMFͷଘࡏνΣοΫͳͲ w CVJMEΞϓϦέʔγϣϯ࣮ߦʹඞཁͳϏϧυ΍ඞཁͳϑΝΠϧͷ௥ՃɺΩϟο

    γϡ౳ͷॲཧ
 FHCVJMEͷ࣮ߦɺKSFͷΠϯετʔϧɺCVJMEQBDL༻ͷϨΠϠʔ࡞੒ͳͲ w CVJMEQBDLUPNMϏϧυύοΫʹඞཁͳઃఆ৘ใ
 JE΍WFSTJPOɺTUBDLͳͲ w UBS΍ΠϝʔδͳͲʹύοέʔδϯάͯ͠഑෍͕Մೳ
 FHQBDLQBDLBHFCVJMENZCVJMEQBDLQBDLBHFDPOpHQBDLBHFUPNM   NZCVJMEQBDL EFUFDU CVJME @ CVJMEQBDLUPNM CJO @
  29. CVJMEQBDLͷ࡞੒ w ܾΊΒΕͨϑΝΠϧߏ੒ w CJO$/#ͷ-JGFDZDMFͰݺͼग़͢ϑΝΠϧ܈ w EFUFDUΞϓϦέʔγϣϯ͕͜ͷCVJMEQBDLͷର৅ͳͷ͔ͷ൑ఆॲཧ
 FHCVJMEHSBEMFɺQBDLBHFKTPOɺ(FNpMFͷଘࡏνΣοΫͳͲ w CVJMEΞϓϦέʔγϣϯ࣮ߦʹඞཁͳϏϧυ΍ඞཁͳϑΝΠϧͷ௥ՃɺΩϟο

    γϡ౳ͷॲཧ
 FHCVJMEͷ࣮ߦɺKSFͷΠϯετʔϧɺCVJMEQBDL༻ͷϨΠϠʔ࡞੒ͳͲ w CVJMEQBDLUPNMϏϧυύοΫʹඞཁͳઃఆ৘ใ
 JE΍WFSTJPOɺTUBDLͳͲ w UBS΍ΠϝʔδͳͲʹύοέʔδϯάͯ͠഑෍͕Մೳ
 FHQBDLQBDLBHFCVJMENZCVJMEQBDLQBDLBHFDPOpHQBDLBHFUPNM   NZCVJMEQBDL EFUFDU CVJME @ CVJMEQBDLUPNM CJO @ api = "0.2" [buildpack] id = "samples/ruby-bundler" version = "0.0.1" name = "Sample Ruby Buildpack" [[stacks]] id = "io.buildpacks.samples.stacks.bionic"
  30. CVJMEQBDLͷ࡞੒ w ܾΊΒΕͨϑΝΠϧߏ੒ w CJO$/#ͷ-JGFDZDMFͰݺͼग़͢ϑΝΠϧ܈ w EFUFDUΞϓϦέʔγϣϯ͕͜ͷCVJMEQBDLͷର৅ͳͷ͔ͷ൑ఆॲཧ
 FHCVJMEHSBEMFɺQBDLBHFKTPOɺ(FNpMFͷଘࡏνΣοΫͳͲ w CVJMEΞϓϦέʔγϣϯ࣮ߦʹඞཁͳϏϧυ΍ඞཁͳϑΝΠϧͷ௥ՃɺΩϟο

    γϡ౳ͷॲཧ
 FHCVJMEͷ࣮ߦɺKSFͷΠϯετʔϧɺCVJMEQBDL༻ͷϨΠϠʔ࡞੒ͳͲ w CVJMEQBDLUPNMϏϧυύοΫʹඞཁͳઃఆ৘ใ
 JE΍WFSTJPOɺTUBDLͳͲ w UBS΍ΠϝʔδͳͲʹύοέʔδϯάͯ͠഑෍͕Մೳ
 FHQBDLQBDLBHFCVJMENZCVJMEQBDLQBDLBHFDPOpHQBDLBHFUPNM   NZCVJMEQBDL EFUFDU CVJME @ CVJMEQBDLUPNM CJO @
  31. CVJMEFSͷ࡞੒ w CVJMEFSΛ࡞੒͢ΔͨΊʹඞཁͳઃఆΛ؅ཧ w Πϝʔδͱͯ͠ύοέʔδϯάͯ͠഑෍Մೳ
 FHQBDLDSFBUFCVJMEFSNZCVJMEFSCJPOJD CVJMEFSDPOpHCVJMEFSUPNM   [[buildpacks]]

    uri = "samples/buildpacks/hello-processes" [[buildpacks]] image = "cnbs/sample-package:hello-universe" [[order]] [[order.group]] id = "samples/hello-world" version = "0.0.1" [[order.group]] id = "samples/hello-moon" version = "0.0.1" [[order.group]] id = "samples/hello-processes" version = "0.0.1" [stack] id = "io.buildpacks.samples.stacks.bionic" run-image = "cnbs/sample-stack-run:bionic" build-image = "cnbs/sample-stack-build:bionic" CVJMEFSUPNM
  32. ΧελϜCVJMEFSʹΑΔΠϝʔδͷ࡞੒   $ cd ${PROJECT_DIR} $ pack build my/image-name

    --builder my-builder:bionic $ docker run -p 8080:8080 my/image-name
  33. ࢀߟ w #VJMEQBDLTJP
 IUUQTCVJMEQBDLTJP w 1BLFUP#VJMEQBDLT
 IUUQTQBLFUPJP w 1BDLUPUIF'VUVSF
 IUUQTEPDTHPPHMFDPNQSFTFOUBUJPOES[BY3F28B8*W(T5XKU-$.R:B'45MU4&K1Y2NPCJMFQSFTFOU

    w %FFQEJWFJOUP4QSJOH#PPU
 IUUQTEPDTHPPHMFDPNQSFTFOUBUJPOES1.'QU+N6)/SE5Y;1S#PFDC8DB(VKG7J#1FEJUTMJEFJEQ