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
How to start with docker
Search
Toni Van de Voorde
January 27, 2017
Technology
1
150
How to start with docker
Shows some tips & tricks on how to start with docker for php projects.
Toni Van de Voorde
January 27, 2017
Tweet
Share
More Decks by Toni Van de Voorde
See All by Toni Van de Voorde
Jenkins Automation
tonivdv
0
390
Automate jenkins job creation (#phpbnl18)
tonivdv
1
190
Automate jenkins job creation
tonivdv
1
1.3k
How we use docker for our development environment
tonivdv
5
340
Other Decks in Technology
See All in Technology
入門 PEAK Threat Hunting @SECCON
odorusatoshi
0
190
事業を差別化する技術を生み出す技術
pyama86
3
1.2k
RaspberryPi CM4(CM5も)面白いぞ!
nonnoise
1
280
Dify触ってみた。
niftycorp
PRO
0
110
【Forkwell】「正しく」失敗できるチームを作る──現場のリーダーのための恐怖と不安を乗り越える技術 - FL#83 / A team that can fail correctly by forkwell
i35_267
2
180
Platform Engineeringで クラウドの「楽しくない」を解消しよう
jacopen
5
310
Quality with Angular: Tools and Processes
rainerhahnekamp
0
100
株式会社Awarefy(アウェアファイ)会社説明資料 / Awarefy-Company-Deck
awarefy
3
12k
開発者のための FinOps/FinOps for Engineers
oracle4engineer
PRO
2
300
Log Analytics を使った実際の運用 - Sansan Data Hub での取り組み
sansantech
PRO
0
230
いまからでも遅くない!コンテナでWebアプリを動かしてみよう!コンテナハンズオン編
nomu
0
200
アジリティを高めるテストマネジメント #QiitaQualityForward
makky_tyuyan
1
550
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Become a Pro
speakerdeck
PRO
26
5.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
The Invisible Side of Design
smashingmag
299
50k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Unsuck your backbone
ammeep
669
57k
Six Lessons from altMBA
skipperchong
27
3.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
450
Bash Introduction
62gerente
611
210k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Transcript
How to start with docker Toni Van de Voorde CTO
@ Adlogix.eu / Adsdaq.eu @tonivdv Unconference
Setup • Native on linux • Docker for Mac/Windows •
Docker toolbox
Docker For Mac • Pros • “Native” approach • No
virtualbox (uses lightweight virtualization of mac-os hypervisor framework) • Nice UX • Cons • Shares without NFS • Only 1 virtual machine
Docker Toolbox • Pros • Easy NFS support with docker-machine-nfs
(OSX only) • Not only 1 virtual machine • Use whatever hypervisor you love (virtualbox, xhyve, parallel, vmware, …) • Cons • Less UX ?
Docker Machine Tips Configure ip range per different box dm
create \ -d virtualbox --virtualbox-hostonly-cidr "192.168.70.1/24" --virtualbox-disk-size "10000" docker-test
Docker Machine Tips Embrace speed by activating NFS brew install
docker-machine-nfs $ docker-machine-nfs docker-test https://github.com/adlogix/docker-machine-nfs
General Tips • Dnsmasq + jwilder’s nginx-proxy • Define your
services with docker-compose • Don’t put sensitive data in the images (ssh keys etc) • Still be careful with case sensitivity
How to with ssh? • Mount to container volumes: -
~/.ssh:/root/.ssh • SSH Agent • (hack) Copy to “volume” docker run --rm --name ssh-data -v my-ssh-data:/root/.ssh –v ${USER_PRIVATE_KEY}:/root/.host-ssh:ro busybox sh -c 'cp ~/.host-ssh/* ~/.ssh && chown -R root:root ~/.ssh && chmod -R 400 ~/.ssh’ docker run –v my-ssh-data:/root/.ssh composer ...
Make cli-commands #!/bin/bash cd $(dirname "$0") docker-compose run --rm composer
"$@” #!/bin/bash cd $(dirname "$0") docker-compose run --rm php-cli php "$@"
Demo
Questions?