Skip to content
A php container with Laravel dependencies
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
Dockerfile
LICENSE
README.md
install_composer.php

README.md

PHP

Build Status Docker Pulls

This container is intended to run Laravel application's queues, cron, etc. and thus comes with a few items to assist:

spatie/laravel-backup Dependencies

  • PHP extension zip
  • mysql-client for mysqldump support

For a container to run nginx/fpm for Laravel applications, check out bkuhl/fpm-nginx.

Crons, Queue Workers and Migrations

Overwrite the container's default command to perform various Laravel tasks.

  • Cron container: use command crond -f -d 8
  • Queue worker container: use command php /var/www/html/artisan queue:listen --sleep=3 --tries=3 --timeout=0
  • Migrations container: use command php /var/www/html/artisan migrate --force

Example Dockerfile

FROM bkuhl/php:7.1

WORKDIR /var/www/html

# Copy the application files to the container
ADD --chown=www-data:www-data  . /var/www/html

USER www-data

    # production-ready dependencies
RUN composer install  --no-interaction --optimize-autoloader --no-dev --prefer-dist \

    # keep the container light weight
    && rm -rf /home/www-data/.composer/cache
You can’t perform that action at this time.