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
59
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
1.9k
PHPで学ぶ Session の基本と応用 / web-app-session-101-2024
hanhan1978
12
5.4k
レガシー回避の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
APIテスト自動化の勘所
yokawasa
7
4.1k
【若手エンジニア応援LT会】AWS Security Hubの活用に苦労した話
kazushi_ohata
0
160
「 SharePoint 難しい」ってよく聞くけど、そんなに言うなら8歳の息子に試してもらった
taichinakamura
1
610
Aurora_BlueGreenDeploymentsやってみた
tsukasa_ishimaru
1
120
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
310
Forget efficiency – Become more productive without the stress
ufried
0
110
使えそうで使われないCloudHSM
maikamibayashi
0
170
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
560
独自ツール開発でスタジオ撮影をDX!「VLS(Virtual LED Studio)」 / dx-studio-vls
cyberagentdevelopers
PRO
1
180
Autify Company Deck
autifyhq
1
39k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
Gradle: The Build System That Loves To Hate You
aurimas
2
140
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Rails Girls Zürich Keynote
gr2m
93
13k
Bash Introduction
62gerente
608
210k
Thoughts on Productivity
jonyablonski
67
4.3k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
How GitHub (no longer) Works
holman
311
140k
Speed Design
sergeychernyshev
24
570
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
Fireside Chat
paigeccino
32
3k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Designing Experiences People Love
moore
138
23k
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 EPDLF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