PHPackages                             lucasdasilvajunior/laravel-dockerfile - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. lucasdasilvajunior/laravel-dockerfile

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

lucasdasilvajunior/laravel-dockerfile
=====================================

Laravel package to scaffold a Dockerfile with Supervisor and schedule:work

v1.0.4(5mo ago)010MITPHPPHP &gt;=8.0

Since Nov 29Pushed 5mo agoCompare

[ Source](https://github.com/LucasDaSilva96/laravel-dockerfile)[ Packagist](https://packagist.org/packages/lucasdasilvajunior/laravel-dockerfile)[ RSS](/packages/lucasdasilvajunior-laravel-dockerfile/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

Laravel Dockerfile Package
==========================

[](#laravel-dockerfile-package)

A Composer-installable Laravel package that provides a production-ready Dockerfile with Supervisor configuration for running Laravel's scheduler.

Features
--------

[](#features)

- 🐳 Production-optimized Dockerfile for Laravel applications
- ⏰ Supervisor configuration to run `php artisan schedule:work`
- 🚀 Simple Artisan command to scaffold Docker files
- 📦 Easy installation via Composer

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0
- Laravel 8.x, 9.x, 10.x, 11.x or 12.x

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require lucasdasilvajunior/laravel-dockerfile
```

The package will be auto-discovered by Laravel.

Usage
-----

[](#usage)

Run the initialization command to copy the Dockerfile and Supervisor configuration to your Laravel project root:

```
php artisan docker:init
```

This command will:

- Copy a production-ready `Dockerfile` to your project root
- Copy a `supervisor.conf` file configured to run Laravel's scheduler

If the files already exist, you'll be prompted to confirm overwriting them.

What's Included
---------------

[](#whats-included)

### Dockerfile

[](#dockerfile)

The generated Dockerfile includes:

- PHP 8.3-FPM base image
- Common PHP extensions (PDO, MySQL, Zip, etc.)
- Supervisor for process management
- Composer for dependency management
- Optimized for production with `--no-dev` and `--optimize-autoloader`
- Proper permissions for Laravel storage and cache directories

### Supervisor Configuration

[](#supervisor-configuration)

The supervisor configuration:

- Runs `php artisan schedule:work` continuously
- Auto-restarts on failure
- Logs output to `/var/log/supervisor/laravel-schedule.log`
- Runs as `www-data` user

Building and Running
--------------------

[](#building-and-running)

After running `php artisan docker:init`, build and run your Docker container:

```
# Build the Docker image
docker build -t my-laravel-app .

# Run the container
docker run -d -p 9000:9000 my-laravel-app
```

Customization
-------------

[](#customization)

Feel free to modify the generated `Dockerfile` and `supervisor.conf` files to suit your specific needs:

- Add additional PHP extensions
- Configure additional Supervisor programs (queue workers, etc.)
- Adjust environment variables
- Add nginx or other services

Alternative: Using vendor:publish
---------------------------------

[](#alternative-using-vendorpublish)

You can also use Laravel's standard publishing mechanism:

```
php artisan vendor:publish --tag=docker-stubs
```

License
-------

[](#license)

This package is open-source software licensed under the MIT license.

Author
------

[](#author)

Lucas Da Silva Junior -

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance71

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

164d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v1.0.2PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/da40dd18bc3c192709026a23642cb1b27407755262d2f3cc481a91a6d0148966?d=identicon)[LucasDaSilva](/maintainers/LucasDaSilva)

---

Top Contributors

[![LucasDaSilva96](https://avatars.githubusercontent.com/u/112213275?v=4)](https://github.com/LucasDaSilva96 "LucasDaSilva96 (5 commits)")

### Embed Badge

![Health badge](/badges/lucasdasilvajunior-laravel-dockerfile/health.svg)

```
[![Health](https://phpackages.com/badges/lucasdasilvajunior-laravel-dockerfile/health.svg)](https://phpackages.com/packages/lucasdasilvajunior-laravel-dockerfile)
```

###  Alternatives

[timokoerber/laravel-one-time-operations

Run operations once after deployment - just like you do it with migrations!

6481.7M11](/packages/timokoerber-laravel-one-time-operations)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[sammyjo20/lasso

Lasso - Asset wrangling for Laravel made simple.

355347.9k](/packages/sammyjo20-lasso)[stechstudio/laravel-env-security

Securely manage .env files for different deployment environments

77116.4k1](/packages/stechstudio-laravel-env-security)[aaronfrancis/airdrop

A Laravel package to deploy your application faster by skipping asset compilation when possible.

19594.9k](/packages/aaronfrancis-airdrop)[richdynamix/arc

Production ready docker based development environment for your Laravel project.

1163.1k](/packages/richdynamix-arc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
