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
ta1kt0me
October 15, 2015
Programming
0
420
開発環境でdockerを使ってみた
http://connpass.com/event/20561/
ta1kt0me
October 15, 2015
Tweet
Share
More Decks by ta1kt0me
See All by ta1kt0me
Update Billion Records
ta1kt0me
3
4.5k
Running with version up
ta1kt0me
0
52
omotesandorb_8.pdf
ta1kt0me
1
370
Rubyでのプロファイリング
ta1kt0me
0
68
Other Decks in Programming
See All in Programming
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
CSC509 Lecture 09
javiergs
PRO
0
140
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
C++でシェーダを書く
fadis
6
4.1k
subpath importsで始めるモック生活
10tera
0
300
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
距離関数を極める! / SESSIONS 2024
gam0022
0
280
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
役立つログに取り組もう
irof
28
9.6k
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Designing Experiences People Love
moore
138
23k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Designing the Hi-DPI Web
ddemaree
280
34k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Automating Front-end Workflow
addyosmani
1366
200k
Docker and Python
trallard
40
3.1k
Unsuck your backbone
ammeep
668
57k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Transcript
Start to use Docker development environment
self • Work • Forkwell, Forkwell Jobs • GitHub •
@ta1kt0me • Twitter • @talkto_me
Docker
͖͔͚ͬ • werckerͷmigration࣌ɺΧϥϜ֦ு͢Δͱ Τϥʔ͕ى͖ͨ • Ewokʢdocker based stackʣΛͬͯղܾ
͔ͤͬ͘DockerͷྲྀΕ͖ͨ͠
ͱΓ͋͑ͣͬͯΈ͍ͨ
·ͣ։ൃڥͰ
ͬͨ͜ͱ • docker-toolboxΛΘͳ͍ • docker-compose up͔͠Θͳ͍ • υΩϡϝϯτ
ͬͨ͜ͱ • docker-toolboxΛΘͳ͍ • docker-compose up͔͠Θͳ͍ • υΩϡϝϯτ
docker-toolbox? Announcing Docker Toolbox http://blog.docker.com/2015/08/docker- toolbox/
docker-toolbox? ؆୯Πϯετʔϥʔ • Docker Client • Docker Machine • Docker
Compose • Docker Kitematic • VirtualBox
ͳΜͰΘͳ͍ͷʁ • Docker Quickstart Terminal • ԶͷΒͳ͍Terminal্ཱ͕͕ͪΔ • ݁ߏ߅͋Δ
/Applications/Docker/Docker Quickstart Terminal.app/Contents/ Resources/Scripts/start.sh
start.sh • docker-machineͳ͔ͬͨΒ࡞ͬͯ • docker-machineىಈͯ͠ • eval $(docker-machine env $VM)
machine͕ىಈ͍ͯ͠Εeval͚ͩ͢Εྑ͛͞
Կ͕ඞཁͳͷʁ
खͰೖΕͯΈΔ brew install docker-machine brew install docker-compose
docker-machine dockerͷϗετΛߏங͢Δπʔϧ $ docker-machine create --driver virtualbox default $ eval
$(docker env default)
tips • docker-machine create ͕ऴΘΒͳ͍ • docker-machine ίϚϯυͷ݁Ռ͕͍ • docker/machineͷissueΛݕࡧɺ50͙݅Β͍͋Δ
• ࣗͷ߹ɺ#1684 Ͱղܾ https://github.com/docker/machine/search?p=1&q=docker- machine+create+hang&type=Issues&utf8=%E2%9C%93
ͬͨ͜ͱ • docker-toolboxΘͳ͍ • docker-compose up͔͠Θͳ͍ • υΩϡϝϯτ
docker-compose ෳίϯςφΛཧͯ͠ҰͭͷαʔϏεͱ͠ ͯఏڙ͢Δπʔϧ
docker-compose • ΞϓϦ͕ґଘ͢ΔπʔϧΛίϯςφʹҠߦ • ΞϓϦࣗମͷDockerfileΛ࡞Βͳ͍ • Docker։ൃڥͷબࢶ • ࠷ॳʹ֮͑Δ͜ͱগͳ͍ํָ͕
db: image: mysql ports: - "3306:3306" environment: MYSQL_ROOT_PASSWORD: root restart:
always redis: image: redis ports: - "6379:6379" restart: always memcached: image: memcached ports: - "11211:11211" restart: always
docker-compose $ docker-compose up -d 1ίϚϯυͰඞཁͳίϯςφ͕શ෦ىಈ ͳΜ͔ศརͦ͏ײ͋Δ
ͬͨ͜ͱ • docker-toolboxΘͳ͍ • docker-compose up͔͠Θͳ͍ • υΩϡϝϯτ
υΩϡϝϯτେࣄ
υΩϡϝϯτ • ಋೖखॱ͚ͩͰྑ͍ͷͰ͔ͬ͠Γॻ͘ • ϦϑΝϨϯεϖʔδͷURLΛࡌͤΔͱ • ͍ͭͷؒʹ͔σϑΥϧτͷಋೖखॱʹ͢Δ
·ͱΊ • খ࢝͘͞ΊΔ • ศརײΞϐʔϧ • ಋ͘
͋Γ͕ͱ͏͍͟͝·ͨ͠