Containerize your PHP application
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
William 0276584b3f
1 month ago
Dockerfile Init 1 month ago Ooops 1 month ago Init 1 month ago
nginx.conf Init 1 month ago


Containing Nginx with FastCGI and Composer.



Clone the repo and build it locally

docker build --no-cache -f ./Dockerfile --tag sample-php-container

The container is now ready to be used, navigate to your project folder.


This will install and or update any packages located in your composer file.

docker run --rm -e UPDATE=1 -v ./:/www sample-php-container


Nginx serves files from the public directory. Any files Nginx fails to find locally will be redirected to index.php.

docker run -dt -v ./:/www -p 8080:8080 --name sample-php-container-name sample-php-container