This image is based on the php:7.1-apache image.
On top of the regular PHP modules use in the official php image, this image installs and enables the following:
- sqlsrv (Official Microsoft SQLServer driver v4.3.0)
It also comes with:
- A preconfigured cron job that runs Laravel scheduled jobs.
- Runs Laravel queues by default with an included conf file.
- SSL support
- The image exposes port 443 and includes a self-signed certificate.
Running the image
The most basic way to run this image is:
docker run -v /path/to/laravel/application:/var/www -p 80:80 -d tresfactorial/laravel
This will serve the application on port 80.
The image includes a deafult supervisor conf file, so you only need to configure your queue dirver inside your app.
If you want to use your own supervisor conf file, all you need to do is mount the folder that contains it into
The conf file included in this image has the following content:
[program:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /var/www/artisan queue:work --sleep=3 --tries=1 autostart=true autorestart=true user=www-data numprocs=8 redirect_stderr=true
To run a container with your own conf file:
docker run -v /path/to/laravel/application:/var/www -v /path/to/laravel/application/supervisor-conf-folder:/etc/supervisor/conf.d -p 80:80 -d tresfactorial/laravel