Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
How to start with docker
Toni Van de Voorde
January 27, 2017
Technology
1
89
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
260
Automate jenkins job creation (#phpbnl18)
tonivdv
1
130
Automate jenkins job creation
tonivdv
1
1.1k
How we use docker for our development environment
tonivdv
5
290
Other Decks in Technology
See All in Technology
400種類のWeb APIをサポートしているデータパイプラインツールにおけるWeb APIとの共存戦略
cdataj
0
130
Kaggleシミュレーションコンペの動向
nagiss
0
220
私見「UNIXの考え方」/20230124-kameda-unix-phylosophy
opelab
0
150
データエンジニアを助けてくれるFivetranとSnowflakeの仕様&機能のご紹介
sagara
0
430
立ち止まっても、寄り道しても / even if I stop, even if I take a detour
katoaz
0
120
AI Builderについて
miyakemito
0
650
230120 ガンダムの事例にみる自動化の対象 Haruka Oh!さん
comucal
PRO
0
110
ML PM, DS PMってどんな仕事をしているの?
line_developers
PRO
1
210
SignalR を使ったアプリケーション開発をより快適に!
nenonaninu
0
190
OVN-Kubernetes-Introduction-ja-2023-01-27.pdf
orimanabu
1
180
目指せCoverage100%! AutoScale環境におけるSavings Plans購入戦略 / JAWS-UG_SRE_Coverage
taishin
0
280
USB PD で迎える AC アダプター大統一時代
puhitaku
0
660
Featured
See All Featured
The Language of Interfaces
destraynor
149
21k
The Cult of Friendly URLs
andyhume
68
5.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
317
22k
Bash Introduction
62gerente
601
210k
4 Signs Your Business is Dying
shpigford
171
20k
The Art of Programming - Codeland 2020
erikaheidi
35
11k
JazzCon 2018 Closing Keynote - Leadership for the Reluctant Leader
reverentgeek
175
9.1k
Documentation Writing (for coders)
carmenintech
51
2.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
22
1.4k
5 minutes of I Can Smell Your CMS
philhawksworth
198
18k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
13
5.4k
Designing for Performance
lara
600
65k
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
"
[email protected]
” #!/bin/bash cd $(dirname "$0") docker-compose run --rm php-cli php "
[email protected]
"
Demo
Questions?