PHP 7 from Docker container complete with Yii 2.0

Pretty cool, a PHP 7.0 (RC4) with Apache environment on Mac from scratch in a few minutes via Docker container:

Includes installation for minimal requirements to support Yii 2.0

Uses Vagrant + VirtualBox on Mac (or similar) or instead you can use any existing Docker host.

Docker: fix for “Cannot connect to the Docker daemon” also Vagrant NFS share connect.

If your Docker or Vagrant networking suddenly stops working in Mac OS X (or similar VM’d docker environment), particularly after using a VPN or similar network disrupting service, try:

First check that it indeed works inside boot2docker, and if it does, then run (from Mac/host environment):

sudo route -nv add -net 192.168.59 -interface vboxnet1

This also fixes the Vagrant “NFS shared folder mounting hangs” issue.

Do ifconfig first to check network IP and vboxnet{n} values and adjust above as needed.