+ All Categories
Home > Technology > Docker & PHP - Practical use case

Docker & PHP - Practical use case

Date post: 15-Feb-2017
Category:
Upload: rjsmelo
View: 625 times
Download: 0 times
Share this document with a friend
15
Docker & PHP R I C A R D O M E L O @ r j s m e l o PHP Dublin Meetup – March 2016
Transcript
Page 1: Docker & PHP - Practical use case

Docker & PHP

R ICARDO MELO@ rjsmelo

PHP Dublin Meetup – March 2016

Page 2: Docker & PHP - Practical use case

About Me

● R icardo Melo● PHP, Mysql, Linux and lots of other OSS● ZCE, RHCE, LPI 3, ITIL, etc● +15 years building (and breaking) things● @rjsmelo● http://rjsmelo.com

Page 3: Docker & PHP - Practical use case

Outline

● Docker● Docker Hub● Docker Compose● Multiple PHP Versions under Docker● Demo

Page 4: Docker & PHP - Practical use case

Docker

Virtual Machine

Docker

Page 5: Docker & PHP - Practical use case

Docker – Moving Parts

● Resource Control Groups● Namespacing● lxc● Docker (1.0 in 2014)● https://www.docker.com/

Page 6: Docker & PHP - Practical use case

Docker – Basic commands

● docker run -ti centos bash● docker ps● docker exec -ti myimage bash

Page 7: Docker & PHP - Practical use case

Docker Image

● Not a Filesystem nor a Virtual Disk● More like a tar

– A “compound” tar● Dockerfile

– docker build

Page 8: Docker & PHP - Practical use case

Docker Hub

● https://hub.docker.com

Page 9: Docker & PHP - Practical use case

Docker Hub

● docker pull● docker commit● docker push

Page 10: Docker & PHP - Practical use case

Docker Compose

● Glue your docker container together● https://docs.docker.com/compose/● docker-compose.yml

Page 11: Docker & PHP - Practical use case

Docker Compose - Commands

● docker-compose up● docker-compose ps● docker-compose kill● docker-compose down● docker-compose run

Page 12: Docker & PHP - Practical use case

Docker Toolbox

● To run docker under OSX and Windows● https://www.docker.com/products/docker-toolbox

Page 13: Docker & PHP - Practical use case

Docker and Multiple PHP Versions – use case

Page 14: Docker & PHP - Practical use case

Demo

● Demo– Simple docker usage– Docker register usage– Docker Compose– Docker Compose with multiple PHP Versions

● Code available on github:– https://github.com/rjsmelo/talk-phpdublin-docker

Page 15: Docker & PHP - Practical use case

Questions ?

Thank you!

@rjsmelo / rjsmelo at gmail.com


Recommended