This is a simple docker image with apache2 and php7.2.10. It is designed to make development for php projects really easy.
For an version with a mysql database click here.
To use this you need the following:
^Clicking on the links will lead you to installation guides.^
Make sure that you can run docker without sudo before continuing.
- Place all of the php files that you want hosted in the
www/
directory. Note: this can be done at any time - Run the command
docker-compose up -d --build
- Docker will start to build the container. When it's the done the container should be running
- Navigate to
localhost:8080/<your-php-file-name>
- To stop the container from running you can do
docker-compose stop
if you want to stop the container anddocker-compose down
if you want to stop and delete the container. - On subsequent starts you can just run
docker-compose up -d
. - If you wish to change the name or location of where your php files are located, go into the
docker-compose.yml
and change the path before the:
under volumes.