Docker LAMP container configured for a Symfony 3+ projects but it can be easily adjusted for any PHP based framework.
- PHP 7.3.1
- MySQL (latest)
- Apache 2.4.25
- MailDev 1.0.0-rc3
- Clone this into your project root directory
- To start new Symfony project run
composer create-project symfony/website-skeleton weborsymfony new --full web. - If you use framework that does have
index.phpfile in your project root, instead of/publicor uses other structure:- Create
/web/publicdirectory and place your framework into/web/publicif your framework doesn't separate public code from framework. - Create
/webdirectory and modify line4of.docker/apache/vhosts/site.confto match your framework structure.
- Create
- Run
docker-compose build
docker-compose run
- Apache:
docker container exec -it apache_container bash - PHP:
docker container exec -it php_container bash - MySQL:
docker container exec -it mysql_container bash - PHPMyAdmin:
docker container exec -it phpmyadmin_container bash - MailDev:
docker container exec -it maildev_container bash
- Webserver (main) http://localhost
- PHPMyAdmin http://localhost:8080
- MailDev http://localhost:8081