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
130
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
350
Automate jenkins job creation (#phpbnl18)
tonivdv
1
160
Automate jenkins job creation
tonivdv
1
1.2k
How we use docker for our development environment
tonivdv
5
320
Other Decks in Technology
See All in Technology
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
複雑なState管理からの脱却
sansantech
PRO
1
140
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
130
ハイパーパラメータチューニングって何をしているの
toridori_dev
0
140
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
590
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
150
AGIについてChatGPTに聞いてみた
blueb
0
130
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How STYLIGHT went responsive
nonsquared
95
5.2k
A Tale of Four Properties
chriscoyier
156
23k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
A designer walks into a library…
pauljervisheath
204
24k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
The Invisible Side of Design
smashingmag
298
50k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
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?