SamplePHPContainer/README.md

654 B

SamplePHPContainer

Containing Nginx with FastCGI and Composer.

Usage

Build

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.

Packages

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

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

Serving

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