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
160
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
400
Automate jenkins job creation (#phpbnl18)
tonivdv
1
200
Automate jenkins job creation
tonivdv
1
1.3k
How we use docker for our development environment
tonivdv
5
350
Other Decks in Technology
See All in Technology
ソフトウェアテストのAI活用_ver1.10
fumisuke
0
270
障害を回避するHttpClient再入門 / Avoiding Failures HttpClient Reintroduction
uskey512
1
430
【ClickHouseMeetup】ClickHouseを活用したセキュリティログ解析AIエージェント『LogEater』とは
hssh2_bin
0
110
Text-to-SQLの評価データセットを作って最新LLMモデルの性能評価をしてみた
gotalab555
2
260
Go Connectへの想い
chiroruxx
0
130
AIエージェント実践集中コース LT
okaru
1
190
Data Hubグループ 紹介資料
sansan33
PRO
0
1.8k
Java 30周年記念! Javaの30年をふりかえる
skrb
4
2.6k
從開發到架構設計的可觀測性實踐
philipz
0
190
会社紹介資料 / Sansan Company Profile
sansan33
PRO
6
370k
データ戦略部門 紹介資料
sansan33
PRO
1
3.1k
Java で学ぶ 代数的データ型
ysknsid25
2
1.1k
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
670
How to Think Like a Performance Engineer
csswizardry
24
1.6k
Building an army of robots
kneath
306
45k
The Cult of Friendly URLs
andyhume
78
6.4k
Statistics for Hackers
jakevdp
799
220k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
GitHub's CSS Performance
jonrohan
1031
460k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Raft: Consensus for Rubyists
vanstee
137
7k
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?