PRESENTATION
Using Docker to Create WordPress Development Environments 2.0
WordCamp Ottawa 2017
July 22nd, 2017
Thiago Loureiro
thiago@tloureiro.com
@th_loureiro
About Me
Development Environments
XAMPP
EasyPHP
WampServer
Mamp
AMPPS
Bitnami
ServerPress
Virtual Machine
Vagrant
VVV
Manual
Host Install
Docker
�"I just FTP to the server"
Dev Environment Problems
The deadly server configuration change.
Dev Environment Problems
Where is the database?!
Dev Environment Problems
Cloning a dev environment
Dev Environment Problems
"I'm going to close some tabs to free up some memory"
Dev Environment Problems
Fear of upgrading
Dev Environment Problems
"How will I build it again?"
Dev Environment Problems
WP version vs PHP version vs PHP configuration vs Server type vs Server version vs Server configuration vs Installed extensions vs Operating System vs...
Key Facts About Docker
Key Facts About Docker
contributors:
Key Facts About Docker
used by:
What Is Docker?
"Docker is a container platform."
….and what is a container?
"A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings."
simple version please.
OS Virtualization vs. Containers
< memory hogging ide >
Demo
apache container demo
Demo
docker run --name my-apache-app -p 80:80 -v "$PWD":/usr/local/apache2/htdocs/ httpd:2.4
user defined name
host port : container port
host folder : container folder
container image name : version
The Docker Hub
https://hub.docker.com/explore/
The Official Wordpress Image
php:5.6-apache
scratch
debian:jessie
Wordpress
The Official Wordpress Image
mysql
scratch
debian:jessie
php:5.6-apache
scratch
debian:jessie
Wordpress
HOST KERNEL
A disposable wordpress install
(code available at https://github.com/tloureiro/wp-docker-presentation)
A disposable wordpress install (on steroids)
(code available at https://github.com/tloureiro/wp-docker-presentation)
Docker Compose
Docker Compose
Demo - Version 1 - WP + DB
Demo - Version 2 - WP + DB + Volumes
Demo - Version 3 - WP + DB + Volumes + phpMyAdmin
Demo - Version 4 - WP + DB + Volumes + phpMyAdmin + extended image
Multi Container vs Single/Fat Container
wordpress
+
apache
+
php
database
alpine linux
nginx
mariadb
php
wordpress
wp-cli
nano
php-imagick
xdebug
phpmyadmin
Some alternatives
https://github.com/visiblevc/wordpress-starter
https://github.com/10up/wp-local-docker
Some alternatives
https://github.com/autopilotpattern/wordpress
the end
Before Docker
After Docker
WordCamp Ottawa 2017
July 22nd, 2017
Thiago Loureiro
thiago@tloureiro.com
@th_loureiro