SamplePHPContainer/README.md

25 lines
654 B
Markdown
Raw Normal View History

2023-02-20 18:27:36 +00:00
# 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.
2023-02-20 18:29:30 +00:00
docker run --rm -e UPDATE=1 -v ./:/www sample-php-container
2023-02-20 18:27:36 +00:00
## 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