Simple Dockerfile for Symfony/Composer LAMP stack. Intended for development.
This is only needed if running a MySQL server locally.
- Install WAMPServer
- Install Apache2
- Install MySQL
Then setup your database accordingly.
- To access a MySQL database hosted locally on your computer, in your MySQL connection parameters replace all instances of
localhost
or127.0.0.1
tohost.docker.internal
- Ensure that the
WORKDIR
in the dockerfile is configured properly, and that you areCOPY
ing the correct folder.
Every Docker implementation of Symfony I had seen was either bloated/far too overkill for a simple development project. If you're used to an easier and more widely used stack like MEAN/MERN, you know that you can find hundreds of accessible docker containers, in the case of Symfony, not so much. This creates a barrier to entry for those who wish to use Docker with Symfony for the first time, as setting up and dealing with WAMP/LAMP can be a major pain in the ass.