Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Build Containers with Dockerfile Best Practicies
Search
Kohei Ota
May 13, 2019
Technology
10
110k
Build Containers with Dockerfile Best Practicies
Kohei Ota
May 13, 2019
Tweet
Share
More Decks by Kohei Ota
See All by Kohei Ota
CloudNative Meets WebAssembly: Exploring Wasm's Potential to Replace Containers
inductor
3
2k
The Cloud Native Chronicles: 10 Years of Community Growth Inside and Outside Japan
inductor
0
110
Cracking the KubeCon CfP
inductor
2
490
KubeCon Recap -Platform migration at Scale-
inductor
1
950
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
450
データベースとストレージのレプリケーション入門 / Intro-of-database-and-storage-replication
inductor
26
6.1k
KubeConのケーススタディから振り返る、Platform for Platforms のあり方と その実践 / Lessons from KubeCon case studies: Platform for Platforms and its practice
inductor
3
780
オンラインの技術カンファレンスを安定稼働させるための取り組み / SRE activity for online conference platform
inductor
1
1.2k
Kubernetesネットワーキング初級者脱出ガイド / Kubernetes networking beginner's guide
inductor
19
6k
Other Decks in Technology
See All in Technology
AWS Community Builderのススメ - みんなもCommunity Builderに応募しよう! -
smt7174
0
170
2025年のARグラスの潮流
kotauchisunsun
0
790
駆け出しリーダーとしての第一歩〜開発チームとの新しい関わり方〜 / Beginning Journey as Team Leader
kaonavi
0
120
DMMブックスへのTipKit導入
ttyi2
1
100
今から、 今だからこそ始める Terraform で Azure 管理 / Managing Azure with Terraform: The Perfect Time to Start
nnstt1
0
220
Godot Engineについて調べてみた
unsoluble_sugar
0
380
Accessibility Inspectorを活用した アプリのアクセシビリティ向上方法
hinakko
0
180
Unsafe.BitCast のすゝめ。
nenonaninu
0
200
【NGK2025S】動物園(PINTO_model_zoo)に遊びに行こう
kazuhitotakahashi
0
220
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
160
GeometryReaderやスクロールを用いた表現と紐解き方
fumiyasac0921
0
100
実践! ソフトウェアエンジニアリングの価値の計測 ── Effort、Output、Outcome、Impact
nomuson
0
2k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
521
39k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
How STYLIGHT went responsive
nonsquared
96
5.3k
Typedesign – Prime Four
hannesfritz
40
2.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
Docker and Python
trallard
43
3.2k
Transcript
+BQBO$POUBJOFS%BZTͰ ࡞ͬͨެࣜσϞΞϓϦͷ %PDLFSpMFʹ͍ͭͯʢԾʣ !JOEVDUPS $POUBJOFS#VJME.FFUVQ
+BQBO$POUBJOFS%BZTͰ ࡞ͬͨެࣜσϞΞϓϦͷ %PDLFSpMFʹ͍ͭͯʢԾʣ !JOEVDUPS $POUBJOFS#VJME.FFUVQ
ࠓͦΜͳʢ΄΅ʣ Ұ͠ͳ͍Ͱ͢
ϕετϓϥΫςΟεʹԊͬͯɺ %PDLFSpMFͷՄಡੑͱ ΩϟογϡɺΠϝʔδͷαΠζͷ ઓུʹ͍ͭͯߟ͑ͯΈͨ !JOEVDUPS $POUBJOFS#VJME.FFUVQ
ࣗݾհ w JOEVDUPS w %PDLFS.FFUVQ5PLZP0SHBOJ[FS w %PDLFSpMFͱӳޠ͕͖ w
কདྷͷເ೦͚ͨͩ͡Ͱαʔόʔ͕͍͍ײ͡ʹ্ཱ͕ͪΔ Α͏ʹͳΔ͜ͱ
%PDLFSCVJMEͯ͠·͔͢ʁ
%PDLFSSVOͯ͠·͔͢ʁ
%PDLFSSVOͯ͠·͔͢ʁ
%PDLFSpMFͷϕετϓϥΫςΟε ͝ଘͰ͔͢ʁ
IUUQTXXXTMJEFTIBSFOFU %PDLFSEDTGEPDLFSpMFCFTU QSBDUJDFT
%PDLFS$PO 4BO'SBODJTDPͰൃද͞Εͨࢿྉ
w Ϗϧυ࣌ؒ w ΠϝʔδαΠζ w ϝϯςφϯεੑ w ηΩϡϦςΟ w ࣋ଓੑ࠶ݱੑ
%PDLFSCVJMEͷ͓ΈϙΠϯτ w ΠϝʔδαΠζ w Ϗϧυͷ͞ w Մಡੑͱϝϯςφϯεੑ w ࠶ݱੑ w
ηΩϡϦςΟ
%PDLFSCVJMEͷ͓ΈϙΠϯτ w ΠϝʔδαΠζˡ w Ϗϧυͷ͞ w Մಡੑͱϝϯςφϯεੑ w ࠶ݱੑ w
ηΩϡϦςΟ
ΠϝʔδαΠζ૿͑Δ w %PDLFSΠϝʔδΛӡ༻͍ͯ͠ΔͱɺαΠζͷංେԽආ͚ ΒΕͳ͍ w ύοέʔδͷՃ w ΞϓϦέʔγϣϯґଘͷϥΠϒϥϦͷՃ w แ͓͖͍ͯͨ͠όΠφϦϑΝΠϧͷՃͳͲͳͲ
ΠϝʔδαΠζΛ͑ΔऔΓΈ ͦͷܰྔͳϕʔεΠϝʔδΛ͏
ϕʔεΠϝʔδͷ ద ΠϝʔδαΠζ ൚༻ੑ ॊೈੑ ֦ுੑ རศੑ %FCJBO TMJN ☓
˚ ˕ ˕ ˕ ˕ ˑ ˑ "MQJOF ˕ ˓ MJCD͕ʜ ˓ ˕ #VTZCPY ˑ ˚ ˚ ˓ 4DSBUDI ☠ ʁʁʁʁ ☓ 㱣
ϕʔεΠϝʔδͷબఆ w جຊɺΠϝʔδαΠζؾʹ͢Δ͖ w ͱ͍͑ɺϥΠϒϥϦͷґଘ͕ؔਂ͘ͳͬͯ͠·͏߹ɺ Πϝʔδͷӡ༻ίετ্͕͕ͬͯ͠·͏ͷͰແཧ͠ͳ͍ํ͕ ྑ͍͜ͱଟ͍ w ׳Εͳ͍͏ͪ"MQJOFΛແཧʹ͏ඞཁͳ͍ͱࢥ͏
ΠϝʔδαΠζΛ͑ΔऔΓΈ ͦͷNVMUJTUBHFCVJMEΛ͏
NVMUJTUBHFCVJMEͱ w ಉҰ%PDLFSpMFͷதͰʮผͷϏϧυͷॲཧʯΛݺͼग़͢Έ w ྫ HPͷΠϝʔδͰίϯύΠϧͨ͠HPͷόΠφϦΛ/PEFKTͷίϯςφ ʹͤͨΓͰ͖Δ w ͭͷΠϝʔδʹෳͷΞϓϦέʔγϣϯґଘύοέʔδΛೖΕΔඞ ཁ͕ͳ͘ͳΔͷͰɺΠϝʔδαΠζμϯ
w %PDLFSpMFͷதͰෳճ'30.Λॻ͘ͱ࣮ݱͰ͖Δ
NVMUJTUBHFCVJMEͱ IVHPͷ$-*Λ%-ͯ͘͠Δεςʔδ औಘͨ͠όΠφϦΛ/PEFͷΠϝʔδʹೖΕΔ XHFUͱ͔DBDFSUJpDBUFTͱ͔ΞϓϦͷ ίϯςφʹΒͳ͍
ΠϝʔδαΠζΛ͑ΔऔΓΈ ͦͷΞϓϦέʔγϣϯͷಈ࡞ʹ ؔͷͳ͍ϑΝΠϧΛऔΓࠐ·ͳ͍
Ͳ͏͍͏͜ͱ͔ w HJUԼͷϑΝΠϧEPDLFSJHOPSF͢Δ w ίϯύΠϧܕݴޠͷ߹ɺιʔείʔυ͍Βͳ͍ w ྫHPͳΒόΠφϦɺKBWBͳΒXBSKBS͚͕ͩ͋Εྑ͍ w ϓϩμΫγϣϯϏϧυΛਖ਼͘͠͏ w
ྫ։ൃ༻ϥΠϒϥϦΠϝʔδͷதʹऔΓࠐ·ͳ͍ w ΤσΟλσόοάπʔϧجຊೖΕͳ͍
ΞηοτͷίϯύΠϧʹͬͨ ϥΠϒϥϦΛফͯ͠ɺ ϓϩμΫγϣϯʹඞཁͳ ґଘؔΛೖΕ͢ ͍ܰͷͰBMQJOFϕʔεʹ͢Δ ίϯύΠϧͷͱ͖BMQJOFͩͱͭΒΈ ͕ਂ͍ͷͰɺϝϯςੑΛߟྀͯ͠ EFCJBOϕʔεͰίϯύΠϧ͢Δ
%PDLFSCVJMEͷ͓ΈϙΠϯτ w ΠϝʔδαΠζ w Ϗϧυͷ͞ˡ w Մಡੑͱϝϯςφϯεੑ w ࠶ݱੑ w
ηΩϡϦςΟ
ϏϧυͷΛ্͛Δཁૉ w ϏϧυΩϟογϡΛޮ͔ͤΔ w ฒྻੑΛ্͛Δ w Ͱ͖ΔݶΓڞ௨ͷϕʔεΠϝʔδΛ͏
%PDLFSpMFͷΩϟογϡ w มߋස͕͍͕ॲཧʹ͕͔͔࣌ؒΔͷΛ্ʹدͤΔ w ύοέʔδϚωʔδϟͱ͔ɺMPDLϑΝΠϧͷ$01:্ʹدͤΔ w ύοέʔδͷΠϯετʔϧͱΞοϓσʔτಉ͡ߦʹدͤΔ w ྫBQUHFUVQEBUFBQUHFUJOTUBMMFNBDT w
#VJME,JUΛೖΕΔ w NPVOUUZQFDBDIFͷ׆༻
%PDLFSpMFͷฒྻੑ w NVMUJTUBHFCVJMEΛ׆༻͢Δ w #VJME,JUΛೖΕΔ
ϕʔεΠϝʔδͷΈΛΔ w %PDLFSΠϝʔδͷ࣮ମ6'4ͱݺΕΔ-BZFSFE'JMFTZTUFN w ڞ௨ͷϕʔεΠϝʔδΛ֤ΞϓϦέʔγϣϯͰ͏ w τʔλϧͷϕʔεΠϝʔδʹ͏σΟεΫ༰ྔ͕ݮͰ͖Δ w 1VMM#VJMEʹ͔͔Δ͕࣌ؒݮͰ͖Δ w
ڞ௨ॲཧΠϝʔδԽ͢Δͷͭͷख
݁#VJME,JUΛ͏
%PDLFSCVJMEͷ͓ΈϙΠϯτ w ΠϝʔδαΠζ w Ϗϧυͷ͞ w Մಡੑͱϝϯςφϯεੑˡ w ࠶ݱੑ w
ηΩϡϦςΟ
ϏϧυͷͱΠϝʔδͷαΠζ Λ࠷༏ઌ͍ͯ͘͠ͱɺ࣍ୈʹ %PDLFSpMF͕ຐ۸ͱԽ͢
ຊηΫγϣϯͰɺ%PDLFSpMFͷ ՄಡੑɾϝϯςφϯεੑΛͲ͏ߴ Ί͍͔ͯ͘ʹ͍ͭͯߟ͑ͯΈΔ
%PDLFSpMFͷՄಡੑ w ಡΈ͍͢%PDLFSpMFͱԿ͔ w ͍ͬͯΔ͜ͱ͕໌֬ w ߦ͕͍ w %PDLFSʹ͓͚ΔίϯςφϓϩηεͷݪଇΛकΔ w
FOUSZQPJOUTIʹཔΓ͗ͯ͢Δ߹ઃܭ͕Α͘ͳ͍͔͠Εͳ͍ w ֤εςʔδͷ໋໊نଇॏཁ w ίϝϯτͰ8IBUͰͳ͘)PX8IZΛॏࢹ͢Δ
%PDLFSpMFͷϝϯςφϯεੑ w όʔδϣϯͷ໌هͳͲ͕ඞཁͳύοέʔδΛೖΕΔ߹ มʹΓग़͢ w มߋཧͷखؒΛݮΒ͢ w Ϗϧυͷͨͼʹ݁Ռ͕มΘΔͷ֎ w λάͦ͏͕ͩɺͰ͖ΔݶΓඞཁͳπʔϧͷόʔδϣϯ
ݻఆ͓ͯ͘͠
%PDLFSCVJMEͷ͓ΈϙΠϯτ w ΠϝʔδαΠζ w Ϗϧυͷ͞ w Մಡੑͱϝϯςφϯεੑ w ࠶ݱੑˡ w
ηΩϡϦςΟ
%PDLFSpMFͷ࠶ݱੑ w ϝϯςφϯεੑͷͱ͜ΖͰݴٴͯͨ͠ͷͰεΩοϓ
%PDLFSCVJMEͷ͓ΈϙΠϯτ w ΠϝʔδαΠζ w Ϗϧυͷ͞ w Մಡੑͱϝϯςφϯεੑ w ࠶ݱੑ w
ηΩϡϦςΟˡ
%PDLFSpMFʹ͓͚ΔηΩϡϦςΟ w ػີใͷऔѻ͍ w Ϗϧυதʹ(JUQVMM44)͢Δͱ͖ͷ伴ͷཧ w ΞϓϦέʔγϣϯͷγʔΫϨοτΩʔͷཧ w Ұ࣌తͳσʔλΛͲ͜ʹͲ͏อଘ͢Δ͔ͷઃܭ
44)(JUͷ伴
NPVOUUZQFTFDSFU Λ͏
NPVOUUZQFTFDSFUͱ w %PDLFS͔Βೖͬͨ৽໋͍͠ྩ w %PDLFSϏϧυதʹػີใΛ҆શʹϚϯτ͢ΔͨΊͷػ ೳ w Ռʹ伴͕Βͳ͍ʂΜΓʂ w 36/NPVOUUZQFTFDSFU
JETTI UBSHFUSPPUTTI JE@STBHJUDMPOF ˢΈ͍ͨͳײ͡ͰࢦఆͰ͖Δɻ
͏ͪΐͬͱଓ͖·͢
%PDLFSpMFͷઓུͱ %PDLFSΒ͍͠ΞϓϦέʔγϣϯͷ ࡞ΓํͱͷؔΘΓํ
%PDLFSΒ͍͠ΞϓϦέʔγϣϯʁ w %PDLFSͷྑ͞ w มԽͷ͍ΞϓϦέʔγϣϯʹରͯ͠ɺ#VJME4IJQ3VO ͷΤίγεςϜΛఏڙ͍ͯ͠Δ͜ͱ w ਖ਼͑͘͠ʮͲ͜Ͱʯʮಉ͡Α͏ʹʯಈ͘ڥ͕࣮ ݱͰ͖Δ
%PDLFSΛlਖ਼͘͠z͏ w ෆཁͳͷೖΕͳ͍ w มߋͷೖΓ͍͢Օॴͨॻ͖ʹ͠ͳ͍ w ։ൃڥɺݕূڥɺຊ൪ڥͰͰ͖ΔݶΓಉ͡ΠϝʔδΛ͏ w ڥ͝ͱͷґଘੑೖʹڥมFOUSZQPJOUΛ׆༻͢Δ w
ίϯςφϓϩηεͷݪଇΛΔ कΔ͔Ͳ͏͔ผͱͯ͠
ͱ͍͑ӡ༻࣌ʹࠔΔ͜ͱ͋Δ w Ͳ͏ͯ͠44)͍ͨ͠ɾɾɾWJN͍͍ͨɾɾɾ w 44)جຊΘͳ͍ 'BSHBUFͱ͔Ͱແ͍ݶΓɺFYFDJUͱ͔͢ Εͳ͍ͣ w σόοάπʔϧ͕ೖ͍ͬͯͳ͍ίϯςφͰσόοάπʔϧΛ
ىಈ͢Δํ๏ 1*%ωʔϜεϖʔεͷڞ༗ػೳΛ͏ w EPDLFSSVOSNJUQJEDPOUBJOFSBQQ EFCVH@JNBHFUBHTI
͑ɺSVOͪ͠Όͬͨ
։ൃͱӡ༻ͱΞϓϦͷߏͷ߹ w ͜͜Ͳ͏ͯ͠ίϯύΠϧ͕͠͠ඞཁͳͷͰ4UBHJOH ͱ1SPEVDUJPOͰΠϝʔδΛ͚ͳ͍ͱ͍͚ͳ͍ΜͰ͢ʂ w ΞϓϦέʔγϣϯͷ࣮ߦʹΫιͰ͔͍όΠφϦ͕ඞཁͰϏ ϧυ͢Δͷʹࢮ͵΄Ͳ͕͔͔࣌ؒͬͯ։ൃͲ͜Ζ͡Όͳ͍ ΜͰ͢ʼʻ w ΠϝʔδαΠζখ͘͞͠Α͏ͱ͢ΔͱΩϟογϡ͕ޮ͖ͮ
Β͘ͳͬͯਏ͍ΜͰ͕͢ʁʁʁ
͍Ζ͍Ζ͋ΔΑͶ
ϕετϓϥΫςΟεͱ%PDLFSXBZ ͷཱ྆ΛɺΞϓϦέʔγϣϯͷߏ ΛकΓͳ͕Β୲อ͢Δͷ͍͠ɻ
ϕετϓϥΫςΟε ͋͘·ͰϕετϓϥΫςΟε
େࣄͳͷ͖ͪΜͱ্ͬͨ Ͱɺ༻๏༻ྔΛकͬͯ͏͜ͱ
,OPXZPVSUPPMT LOPXZPVSBQQMJDBUJPO
5IBOLTGPSZPVSBUUFOUJPO