Proof of concept setup for Wordpress running under PHP-FPM with an Nginx frontend
Build a copy of this image: git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-wordpress-fpm-nginx cd docker-wordpress-fpm-nginx docker build -t nginx-fpm .
Build a wordpress:fpm image:
git clone git://github.com/md5/wordpress.git docker-wordpress-fpm
cd docker-wordpress-fpm
git checkout add-fpm-variant
docker build -t wordpress:fpm fpm
Launch an instance of wordpress:fpm just as you'd launch wordpress:
docker run -d --link some-mysql:mysql --name wordpress-fpm wordpress:fpm
Launch an instance of this image to front wordpress:fpm and serve static assets:
docker run -d --link wordpress-fpm:fpm --volumes-from wordpress-fpm -p 80:80 nginx-fpm
Thanks for this gist, it helped me a lot.
BTW, it's also possible to simply start a container with a custom config file for nginx without building an image from Dockerfile:
docker run -d -v /some/wordpress-fpm.conf:/etc/nginx/conf.d/default.conf:ro --link wordpress-fpm:fpm --volumes-from wordpress-fpm -p 80:80 nginx