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
Dockerでアプリケーションを 本番リリースするまで
Search
Ryo Tomidokoro
October 08, 2017
Technology
7
2k
Dockerでアプリケーションを 本番リリースするまで
とにかく、コンテナを本番にリリースするにはどうしたら良いか。その1点にフォーカスしました。
Ryo Tomidokoro
October 08, 2017
Tweet
Share
More Decks by Ryo Tomidokoro
See All by Ryo Tomidokoro
集中して作業する技術/how_to_work_deeply
hanhan1978
61
40k
PHPでデータベースを作ってみた/create-data-with-php
hanhan1978
10
9.1k
ADRを一年運用してみた/adr_after_a_year
hanhan1978
8
3.4k
B+木入門:PHPで理解する データベースインデックスの仕組み/b-plus-tree-101
hanhan1978
5
4.5k
ADRを一年運用してみた/our_story_about_adr
hanhan1978
5
2k
PHPで学ぶ Session の基本と応用 / web-app-session-101-2024
hanhan1978
12
5.5k
レガシー回避のPHP開発術/avoid_php_legacy
hanhan1978
16
12k
Laravel Collectionの計算量を調べてみた2023/laravel_collection_time_complexity_2023
hanhan1978
1
1.4k
PHP で学ぶ Cache の距離の話 / study_cache_with_php
hanhan1978
7
2.1k
Other Decks in Technology
See All in Technology
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
230
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
880
Engineer Career Talk
lycorp_recruit_jp
0
190
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
150
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
600
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
The Rise of LLMOps
asei
8
1.7k
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
4 Signs Your Business is Dying
shpigford
180
21k
How to train your dragon (web standard)
notwaldorf
88
5.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
Statistics for Hackers
jakevdp
796
220k
Code Reviewing Like a Champion
maltzj
520
39k
Designing Experiences People Love
moore
138
23k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Become a Pro
speakerdeck
PRO
25
5k
Documentation Writing (for coders)
carmenintech
65
4.4k
Transcript
DockerͰΞϓϦέʔγϣϯΛ ຊ൪ϦϦʔε͢Δ·Ͱ 1)1$POGFSFODF *OOPWBUPS+BQBO*OD ॴ྄ &OHJOFFS
͓Βͤ εϥΠυSpeakerDeckʹΞοϓ͠·͕͢… ࡱӨࣗ༝ʹ͍ͯͯ͋͠Γ·ͤΜ !IBOIBO QIQDPOQIQDPO@
࣮ ԬͷϖνίϯͰಉ༷ͷηογϣϯΛͨ͠ https://speakerdeck.com/hanhan1978/dockerwoben-fan-deshi-tutemitefen-katutakoto
ྫ͑͜Μͳ༰ 1. ։ൃ࣌ʹԿΛ͖͔͢ʁ 2. CIͷ 3. ຊ൪Ͱdockerಈ͔࣌͢ͷ᠘
ࠓগ͠झΛม͑·͢ɻ
%PDLFSͷຊ൪ීٴ·ͩ·͍ͩ Docker৮ͬͯΈͨΒɺ͜Εྑ͍ͷͩͬͨʂ ͱ͍͑ɺ͍͖ͳΓձࣾʹDockerͷಋೖग़དྷͳ͍ ࠓΊ͓ͯ͜͏…(ٞͱ͔େมͩ͠) ݁Ռͱͯ͠ݟ͕ཷ·Βͳ͍ ͜ͷྲྀΕSubversion -> Git ͷ࣌ʹݟͨ
νϚνϚͨ͠ɺݱஈ֊Ͱແҙຯ
ຊͷςʔϚ
وํͷϋʔτʹՐΛ͚ͭΔ
ͭ·Γ ͜ͷηογϣϯΛػձʹ وํ͕ίϯςφΛຊ൪ʹ ϦϦʔεͨͯͨ͘͠·Βͳ͘ͳΔʂ ίϯςφຊ൪ϦϦʔεͷ࣮Λղআͯ͠Β͏ʂ
͋͞͡Ί·͠ΐ͏ɻ RIP - Vagrant
DockerίϯςφΛຊ൪Ͱ ͏ͷʹඞཁͳ͜ͱ
ඞཁͳࣄ 1. Twelve Factor App 2. Dockerͷجૅࣝ 3. Docker࣮ߦڥʹର͢Δཧղ ൱ʂʂ
ຊʹඞཁͳ͜ͱ 1. ਂ͘ߟ͑ͳ͍ 2. ίϐϖ 3. ΫϨδοτΧʔυ
ͱ͍͑
࠷ݶͷࣝ
࠷ݶͷ̏ͭ 1. ϩʔΧϧͰίϯςφΛ࡞ 2. ϨδετϦʹPUSH 3. ຊ൪ʹϦϦʔε
࠷ݶͷͭͷਤ
දతϚωʔδυɾαʔϏε (,&(PPHMF$POUBJOFS&OHJOF %PDLFS$MPVE4XBSN.PEF #&5"
,VCFSOFUFT౾ࣝ ɾΫόϧωςεͱಡΉ ɾ,4ͱུ͢ ɾ<LPPCFSOBZ`UBDF> ɾ4BJMJOH.BTUFSધͷૢॎऀ
%PDLFS4XBSN౾ࣝ ɾεΥʔϜͱಡΉ ɾུশແ͍ ɾ4XBSN܈Ε
͔͜͜Βຊ൪ڥͷछྨ͝ͱ ʹखॱΛհ͠·͢
(,& ,VCFSOFUFT ฤ ࣄલ४උ GCPͷΞΧϯτ࡞ ίϯςφΫϥελͷ࡞ https://cloud.google.com/container-engine/docs/clusters/operations?hl=ja gcloudίϚϯυͷΠϯετʔϧ https://cloud.google.com/container-engine/docs/before-you-begin?hl=ja kubectlίϚϯυͷΠϯετʔϧ
(,& ,VCFSOFUFT ฤ ϩʔΧϧͰͷίϯςφ࡞ EPDLFSCVJMEUHDSJP\130+&$5@*%^TBNQMFCMPHW EPDLFSSVOUSNQHDSJP\130+&$5@*%^TBNQMFCMPHW ಈ࡞֬ೝ
(,& ,VCFSOFUFT ฤ HDMPVEEPDLFSQVTIHDSJP\130+&$5@*%^TBNQMFCMPHW ϨδετϦʹPUSH
(,& ,VCFSOFUFT ฤ LVCFDUMSVOTBNQMFJNBHFHDSJP\130+&$5@*%^TBNQMFCMPHWQPSU LVCFDUMFYQPTFEFQMPZNFOUTBNQMFUZQF-PBE#BMBODFSQPSU ຊ൪ϦϦʔε ֬ೝ LVCFDUMHFUTFSWJDF
4XBSN.PEFฤ ࣄલ४උ Docker cloudͷΞΧϯτ࡞ https://cloud.docker.com AWSͷΞΧϯτ࡞ https://cloud.docker.com SwarmΫϥελͷ࡞
4XBSN.PEFฤ ϩʔΧϧͰͷίϯςφ࡞ EPDLFSCVJMEUSFHJTUSZHJUMBCDPNIBOIBOCMPHW EPDLFSSVOUSNQSFHJTUSZHJUMBCDPNIBOIBOCMPHW ಈ࡞֬ೝ
4XBSN.PEFฤ EPDLFSQVTISFHJTUSZHJUMBCDPNIBOIBOCMPHW ϨδετϦʹPUSH
4XBSN.PEFฤ EPDLFSTFSWJDFDSFBUFOBNFTBNQMFQVCMJTISFQMJDBT SFHJTUSZHJUMBCDPNIBOIBOCMPHW ຊ൪ϦϦʔε ֬ೝ EPDLFSTFSWJDFMT
)FSPLVฤ ࣄલ४උ herokuίϚϯυͷΠϯετʔϧ herokuͷΞΧϯτ࡞ https://cloud.docker.com
)FSPLVฤ APPΛ࡞ͯ͠ɺPUSH IFSPLVDPOUBJOFSMPHJO IFSPLVDSFBUF IFSPLVDPOUBJOFSQVTIXFC IFSPLVPQFO ಈ࡞֬ೝ ίϯςφ࣮ߦڥͱ͍͏ΑΓɺίϯςφbuild & run
DEMO
·ͱΊ
·ͱΊ ϚωʔδυͳڥΛ͏͜ͱͰɺ͔ͳΓ؆୯ɻ ؆୯ͳΞϓϦͳΒɺͳΜ͔͓ࢼ͠Ͱ͖ͦ͏͡Όͳ͍ʁ