Sign inSign up

corbosman/nginx-php

By corbosman

•Updated over 1 year ago

A Docker image that combines nginx and php, optimised for laravel. (work in progress)

Image
2

10K+

corbosman/nginx-php repository overview

This is a docker image that combines nginx and php in a single image. This is much faster than running each image separately. It is optimised for use in laravel projects. Right now it is only published as an alpine image.

⁠Supported tags

You can also use minor versions like 7.4.5

⁠Quick Reference

⁠How to use this image

This image will start up nginx with php-fpm listening on port 80. The default site config expects the application to be mounted on /app, with the documentroot on /app/public. You can override this by using your own default.conf file.

docker run -v ~/Code/myapp:/app corbosman/nginx-php:7.3 php artisan
Laravel Framework 5.8.30

Usage:
  command [options] [arguments]
...

⁠docker-compose

This image does not give you a full developer environment for your laravel application. There are other images for that. Any additional services like mysql or redis you need alongside this image can be started using docker-compose. Refer to the docker-compose documentation for more information.

⁠timezone

The default timezone is Europe/Amsterdam. To use your own timezone add a TZ environment variable.

docker run -v ~/Code/myapp:/app corbosman/nginx-php:7.3 date
Sun Oct 20 14:14:55 CEST 2019
docker run -e TZ=America/New_York -v ~/Code/myapp:/app corbosman/nginx-php:7.3 date
Sun Oct 20 08:14:55 EDT 2019

⁠Note

This is work in progress, I use this image myself on personal projects. Feel free to comment or ask questions on the github repo.

Tag summary

Content type

Image

Digest

sha256:c4207faf8…

Size

48.7 MB

Last updated

over 1 year ago

docker pull corbosman/nginx-php