Run a local PHP server with Docker

18 December 2017 Contribute to this post

Step 1

Install Docker.

Step 2

From terminal, run the following (fix the ~/your-php-project/ path to point to your local PHP project folder):

docker run -tid -p 80:80 --name apache -v ~/your-php-project/:/var/www/html nimmis/apache-php5

Step 3

Enjoy on http://localhost/.

Additional

Stop the server with docker stop apache.