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

Recommend: Cacheful Docker Image

Fbf50ef2019e5f96cc6060962de4a945?s=47 Hurry
December 10, 2018

Recommend: Cacheful Docker Image

Fbf50ef2019e5f96cc6060962de4a945?s=128

Hurry

December 10, 2018
Tweet

More Decks by Hurry

Other Decks in Technology

Transcript

  1. Recommend : Cacheful Docker Image Container SIG Meet-up 2018 Fall

    @hurry_41 Kansai University Graduate School
  2. ࣗݾ঺հͱܦҢઆ໌

  3. ॴଐ : ؔ੢େֶ େֶӃ M1 Kyeord : ηΩϡϦςΟ,ϥϯαϜ΢ΣΞ,Ϋϥ΢υ… Hurry (೻ຏঘر)

  4. ͜ͷՆ Πϯλʔϯγοϓʹ ߦ͖ͬͯ·ͨ͠

  5. Recruit Internship for Specialist 2018 - ENGINEER -

  6. ୊ࡐ

  7. Docker run ͢Δ͜ͱͳ͘ ImageΛ੬ऑੑݕ͍ࠪͨ͠

  8. → docker run ࣌ͷFSߏ଄ͷ࠶ݱ

  9. DockerΛ࢖ͬͨ͜ͱͷͳֶ͍ੜ͕ 10Ӧۀ೔Docker Image ʹ͍ͭͯௐࠪ͠·ͨ͠

  10. ࠓճͷLT ɿ Πϯλʔϯੜ׆ͷ෭࢈෺

  11. एഐऀͰ͕͢ɺ ΑΖ͓͘͠Ͷ͕͍͠·͢

  12. վΊ·ͯ͠

  13. Recommend : Cacheful Docker Image Container SIG Meet-up 2018 Fall

    ͜Μͯͳྺ 1ϲ݄ͷ͔͋ͪΌΜ
  14. RUN ·ͱΊͯ·͔͢ʁ

  15. Docker Image ͸ϨΠϠߏ଄

  16. RUNͷ࡟ݮ = ϨΠϠͷ࡟ݮ

  17. = ΠϝʔδαΠζͷ࡟ݮ

  18. RUNΛ෼͚Δͱ redisͷΠϯετʔϧ

  19. ΠϝʔδαΠζɿ244MB ※WORKDIR͸ϨΠϠΛ࡞Γ·ͤΜ

  20. RUNΛ·ͱΊΔͱ redisͷΠϯετʔϧ

  21. ΠϝʔδαΠζɿ131MB

  22. ͳΜͰ΋RUNΛ·ͱΊΕ͹OKʁ

  23. NO

  24. ͨͱ͑͹

  25. td-agent Ұ෦ൈਮ

  26. td-agent Ұ෦ൈਮ มߋʹͳͬͨͱ͢Δ

  27. td-agent Ұ෦ൈਮ ΩϟογϡࡁΈ

  28. td-agent Ұ෦ൈਮ ͔͜͜ΒBuild ↓

  29. td-agent Ұ෦ൈਮ RUN Λ·ͱΊͯΈΔ

  30. td-agent Ұ෦ൈਮ RUN Λ·ͱΊͯΈΔ มߋʹͳͬͨͱ͢Δ

  31. td-agent Ұ෦ൈਮ ͔͜͜ΒBuild ↓

  32. ΠϝʔδαΠζ͸ͲͪΒ΋ಉ͡

  33. ద౓ʹ·ͱΊ͍ͨ

  34. Ͳ͏൑ఆ͢Δʁ

  35. docker history?

  36. docker history?

  37. ϨΠϠΛ·ͱΊͯຊ౰ʹޮ཰Խ͢Δͷ͔ෆ໌

  38. ώϡʔϦεςΟοΫͳܦݧଇ

  39. ɾύοέʔδΠϯετʔϧͱΩϟογϡ࡟আΛ·ͱΊΔ ɾϑΝΠϧͷଐੑมߋ΋·ͱΊΔ ɾADD,COPY,RUNҎ֎͸·ͱΊΔඞཁ͕ͳ͍

  40. ؾ͔ͮ͵͏ͪʹଞϨΠϠͷϑΝΠϧΛ ৮ͬͯ͠·ͬͯΔ͜ͱ΋

  41. ϨΠϠؒͷॏෳϑΝΠϧΛݕ஌͍ͨ͠

  42. ɾmanifest.json ɾConfig.json ɾlayer.tar Πϝʔδͷ੩తղੳ

  43. ɾॏෳϑΝΠϧ ɿ ্ॻ͖ ɾ.wh.ϑΝΠϧ໊ ɿ ࡟আ(ԼҐσΟϨΫτϦ΋࡟আ) ɾ.wh..wh..opq ɿ ԼҐϨΠϠʹͯσΟϨΫτϦ಺Λ ࠶ؼతʹḷΒͳ͍

    ϗϫΠτΞ΢τ
  44. None
  45. ৄ͘͠͸ ɾ Image Specification v1.2.0 ɾmoby/pkg/archive/whiteouts.go

  46. πʔϧΛ࡞Γ·ͨ͠ https://github.com/recruit- tech/duplayer

  47. None
  48. None
  49. ɾ·ͱΊͨࡍͷ࡟ݮαΠζɾϑΝΠϧ਺Λදࣔ ɾॏෳϑΝΠϧΛαΠζॱʹදࣔ ϨΠϠؒͰ

  50. ػೳతʹ্Ґޓ׵Ͱ͋Δ diveΛ࢖͍·͠ΐ͏