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.6k
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
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
300
MCP with Cloudflare Workers
yusukebe
2
220
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
CSC509 Lecture 14
javiergs
PRO
0
140
talk-with-local-llm-with-web-streams-api
kbaba1001
0
180
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
690
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
670
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
220
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
335
57k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Writing Fast Ruby
sferik
628
61k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Adopting Sorbet at Scale
ufuk
73
9.1k
Building Adaptive Systems
keathley
38
2.3k
A Tale of Four Properties
chriscoyier
157
23k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
GitHub's CSS Performance
jonrohan
1030
460k
Become a Pro
speakerdeck
PRO
26
5k
Building Your Own Lightsaber
phodgson
103
6.1k
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ΛࡌͤΔͱ • ͍ͭͷؒʹ͔σϑΥϧτͷಋೖखॱʹ͢Δ
·ͱΊ • খ࢝͘͞ΊΔ • ศརײΞϐʔϧ • ಋ͘
͋Γ͕ͱ͏͍͟͝·ͨ͠