This projects is forked from https://github.com/fontebasso/docker-php-nginx
This project is container image docker for run PHP with NGINX.
This image is ready to run in production, suggestions for improvements and corrections are very welcome, see how to contribute.
However, if you identify a security breach, please report it as soon as possible under guidelines outlined in our security policy.
Use this docker image as a base to run your project, tested on Laravel 8 projects, map your source code to the /app
directory and build your image as suggested below:
FROM fitprimelabs/php-nginx:[version]
COPY /src /app
RUN chown -R 82:82 /app
Important note: we run the command chown -R 82:82 /app to change the user and group owning the files to
www-data
, this avoids permissions issues when running your code.
docker build -t your-app:latest .
docker run -p 8080:80 -t your-app:latest
After run
, open in your browser http://localhost:8080
and enjoy!
To run this image, only the Docker Engine is needed.
/app
- base directory for your application/app/public
- directory exposed to the world
- PHP 8.1
- Nginx
- Imagemagick
See Dockerfile for details of the extensions, libs and configurations.
- Federico Maiorini FitprimeLabs
- Samuel Fontebasso - fontebasso
See also the list of contributors who participated in this project.
The MIT License, see the LICENSE file for details.