Public Repository

Last pushed: a month ago
Short Description
Generic image for Laravel apps. Based on the php:7.1-apache image.
Full Description

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:

  • gd
  • exif
  • gettext
  • intl
  • ldap
  • mcrypt
  • mbstring
  • pdo_mysql
  • pdo_pgsql
  • xmlrpc
  • pcntl
  • bcmath
  • xsl
  • imap
  • zip
  • pdo_sqlsrv
  • sqlsrv (Official Microsoft SQLServer driver v4.3.0)
  • ldap
  • imap

It also comes with:

  • composer
  • git
  • cron
  • supervisor
  • 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.

Laravel queues

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 /etc/supervisor/conf.d.
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
Docker Pull Command
Owner
tresfactorial