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
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
Java ジェネリクス入門 2024
nagise
0
600
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
240
C#/.NETのこれまでのふりかえり
tomokusaba
1
160
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
7
430
カスタムしながら理解するGraphQL Connection
yanagii
1
1.2k
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
200
CSC509 Lecture 09
javiergs
PRO
0
100
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
210
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
1
290
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.5k
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
410
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
243
12k
Become a Pro
speakerdeck
PRO
24
5k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Done Done
chrislema
181
16k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
It's Worth the Effort
3n
183
27k
A Modern Web Designer's Workflow
chriscoyier
692
190k
The Pragmatic Product Professional
lauravandoore
31
6.3k
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ΛࡌͤΔͱ • ͍ͭͷؒʹ͔σϑΥϧτͷಋೖखॱʹ͢Δ
·ͱΊ • খ࢝͘͞ΊΔ • ศརײΞϐʔϧ • ಋ͘
͋Γ͕ͱ͏͍͟͝·ͨ͠