Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FitprimeLabs/docker-php-nginx

 
 

fitprimelabs/php-nginx

Docker Pulls GitHub Repo GitHub License

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.

Getting Started

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:

Step-to-step

1. Your Dockerfile

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.

2. Build a image

docker build -t your-app:latest .

3. Run application

docker run -p 8080:80 -t your-app:latest

After run, open in your browser http://localhost:8080 and enjoy!

Prerequisities

To run this image, only the Docker Engine is needed.

Volumes

  • /app - base directory for your application
  • /app/public - directory exposed to the world

Built With

  • PHP 8.1
  • Nginx
  • Imagemagick

See Dockerfile for details of the extensions, libs and configurations.

Find Us

Authors

Original author

See also the list of contributors who participated in this project.

License

The MIT License, see the LICENSE file for details.

About

This project is a image docker for run PHP with NGINX in production.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 76.4%
  • Shell 21.7%
  • PHP 1.9%