This is an environment for developing any PHP application.
This container allows you to have a version of PHP without installing PHP locally. Any PHP application can run on it, including frameworks like Symfony, Laravel, Slim, etc.
- Copy the
docker/.env.examplefile to.envand modify it as needed, such as setting the desired PHP version. - In the
appfolder, the content is an example. Place your project inside. - Use the following Docker commands:
docker/create_env.sh: To configure your environment and remove unnecessary files including folder .gitdocker/version: To select a PHP version, for example,7.2,5.4, or8.2docker/exec: To execute a command in the containerdocker/log: To get real-time logsdocker/restart: To rebuild and restart the containerdocker/start: To build and start the containerdocker/stop: To stop and remove the unused container
NOTE: It is possible to add a PHP version to the commands docker/restart 7.2 and docker/start 7.2, this is optional.
And that's it, very simple.
- Julien Jean
- France
- By discord