Example files of my tutorial on PHP on Docker (check out the branches!)
In this tutorial I'll take you on "my" journey of learning Docker as a PHP developer. Since I actively use everything explained along the way (and force it upon my team ;)) I can hopefully shed some light onto some more advanced issues like cross-OS-setups and seamless IDE integration.
Two words of caution: - I tend to write rather lengthy, in-dept articles so you should allocate some time to work it all through - my main OS is Windows. Although most of the things should be easily transferable into OSX/Linux you might run into some quirks that I didn't encounter.
Each tutorial is placed in a separate branch and has an accompanying article in my blog I recommend to clone the full repository and check out the corresponding branch for easy reference. Example:
mkdir -p /c/codebase cd /c/codebase/ git clone https://github.com/paslandau/docker-php-tutorial.git cd docker-php-tutorial
git checkout part_2_setting-up-phpstorm-with-xdebug-for-local-development-on-docker
A primer on Docker. What is Docker? How to install it / transition from Vagrant? How to interact with containers? How to organize multiple services (php-cli, php-fpm, nginx) via docker-compose?
Using docker for Development. How to configure PhpStorm to play nicely with Docker? How to setup Xdebug (including the solution for the dreaded 'Connection with Xdebug was not established.' error)?
Running a battle-tested development infrastructure for PHP developers in Docker. How to organize the docker folder structure (e.g. shared scripts for containers)? How to establish a convenient workflow via