Skip to content

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

License

Notifications You must be signed in to change notification settings

headsnet/docker-php-nginx

 
 

Repository files navigation

fontebasso/php-nginx

Docker Build 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 fontebasso/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

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

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

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 71.3%
  • Shell 25.9%
  • PHP 2.8%