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
410
開発環境で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
50
omotesandorb_8.pdf
ta1kt0me
1
360
Rubyでのプロファイリング
ta1kt0me
0
67
Other Decks in Programming
See All in Programming
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.7k
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
140
リリース8年目のサービスの1800個のERBファイルをViewComponentに移行した方法とその結果
katty0324
5
3.6k
Honoの来た道とこれから
yusukebe
19
3k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
1
290
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
110
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
570
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.1k
EventSourcingの理想と現実
wenas
6
2.1k
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
7
2.8k
WEBエンジニア向けAI活用入門
sutetotanuki
0
300
Featured
See All Featured
Six Lessons from altMBA
skipperchong
26
3.5k
How to Ace a Technical Interview
jacobian
275
23k
A better future with KSS
kneath
238
17k
Writing Fast Ruby
sferik
626
61k
Rails Girls Zürich Keynote
gr2m
93
13k
Ruby is Unlike a Banana
tanoku
96
11k
RailsConf 2023
tenderlove
29
880
Bash Introduction
62gerente
608
210k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Building Your Own Lightsaber
phodgson
102
6k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Embracing the Ebb and Flow
colly
84
4.4k
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ΛࡌͤΔͱ • ͍ͭͷؒʹ͔σϑΥϧτͷಋೖखॱʹ͢Δ
·ͱΊ • খ࢝͘͞ΊΔ • ศརײΞϐʔϧ • ಋ͘
͋Γ͕ͱ͏͍͟͝·ͨ͠