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
360
Automate jenkins job creation (#phpbnl18)
tonivdv
1
170
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
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.2k
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
220
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
13
3.7k
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
0
140
podman_update_2024-12
orimanabu
1
270
生成AIのガバナンスの全体像と現実解
fnifni
1
190
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
190
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
840
C++26 エラー性動作
faithandbrave
2
730
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Building Applications with DynamoDB
mza
91
6.1k
Music & Morning Musume
bryan
46
6.2k
A Tale of Four Properties
chriscoyier
157
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Writing Fast Ruby
sferik
628
61k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Making Projects Easy
brettharned
116
5.9k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
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?