Simple Laravel docker image that works! Based on dunglas/frankenphp
.
Note: This setup can also be used for non-Laravel projects.
See: https://hub.docker.com/r/oozman/php/tags
- Light weight, based on
frankenphp
image - Caddy
- PHP 8.3
- Supercronic
- Supervisor
install-php-extensions
enabled
Run this command in the root directory of your Laravel project:
docker run -d -p 8080:80 -v $(pwd):/app oozman/php:8.3-frankenphp
Visit your laravel app at http://localhost:8080
By default, this image is served over HTTP. To enable HTTPS, you can set the following environment variables:
# Be sure to replace "your-domain-name.example.com" by your domain name
ENV SERVER_NAME=your-domain-name.example.com
# If you want to disable HTTPS, use this value instead:
ENV SERVER_NAME=:80
To install and enable PHP extension, use install-php-extensions
command.
Example:
RUN install-php-extensions redis ...