On the other hand you have to link them together to allow them to interact. The docker hub provides ready to go containers for php, databases, etc and it is easy to use them.
Else just use the docker containers the easiest way you can. If you will be using docker in production, then try to run your docker containers in your dev environment as they will be in production. There is no correct answer to that question. Should there be separate Docker containers for the web server (such as Apache), the database server (such as MySQL) and each part of the web application?
How to develop a LAMP web application using Docker, Puppet and Vagrant?