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
180
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
420
Automate jenkins job creation (#phpbnl18)
tonivdv
1
210
Automate jenkins job creation
tonivdv
1
1.3k
How we use docker for our development environment
tonivdv
5
360
Other Decks in Technology
See All in Technology
AI時代に非連続な成長を実現するエンジニアリング戦略
sansantech
PRO
3
910
カミナシ社の『ID管理基盤』製品内製 - その意思決定背景と2年間の進化 #AWSUnicornDay / Kaminashi ID - The Big Whys
kaminashi
3
720
おやつは300円まで!の最適化を模索してみた
techtekt
PRO
0
250
DuckDB-Wasmを使って ブラウザ上でRDBMSを動かす
hacusk
1
140
ソフトウェア エンジニアとしての 姿勢と心構え
recruitengineers
PRO
26
12k
オブザーバビリティが広げる AIOps の世界 / The World of AIOps Expanded by Observability
aoto
PRO
0
250
実践アプリケーション設計 ①データモデルとドメインモデル
recruitengineers
PRO
5
1.4k
衝突して強くなる! BLUE GIANTと アジャイルチームの共通点とは ― いきいきと活気に満ちたグルーヴあるチームを作るコツ ― / BLUE GIANT and Agile Teams
naitosatoshi
0
290
『FailNet~やらかし共有SNS~』エレベーターピッチ
yokomachi
1
190
「魔法少女まどか☆マギカ Magia Exedra」での負荷試験の実践と学び
gree_tech
PRO
0
440
Figma + Storybook + PlaywrightのMCPを使ったフロントエンド開発
yug1224
10
3.6k
退屈なことはDevinにやらせよう〜〜Devin APIを使ったVisual Regression Testの自動追加〜
kawamataryo
4
1.1k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
Balancing Empowerment & Direction
lara
3
600
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Done Done
chrislema
185
16k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Automating Front-end Workflow
addyosmani
1370
200k
Faster Mobile Websites
deanohume
309
31k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
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?