PHPackages                             blamebutton/laravel-docker-builder - 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. [Image &amp; Media](/categories/media)
4. /
5. blamebutton/laravel-docker-builder

ActiveLibrary[Image &amp; Media](/categories/media)

blamebutton/laravel-docker-builder
==================================

Production ready Docker files for Laravel

0.1.4(3y ago)94247↓100%3[2 issues](https://github.com/blamebutton/laravel-docker-builder/issues)[2 PRs](https://github.com/blamebutton/laravel-docker-builder/pulls)MITPHPPHP ^8.0CI passing

Since Jan 11Pushed 3w ago1 watchersCompare

[ Source](https://github.com/blamebutton/laravel-docker-builder)[ Packagist](https://packagist.org/packages/blamebutton/laravel-docker-builder)[ Docs](https://github.com/blamebutton/laravel-docker-builder)[ RSS](/packages/blamebutton-laravel-docker-builder/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (6)Versions (11)Used By (0)

[![Banner](https://camo.githubusercontent.com/a13917d77c646c76aff2a7d02bed1181c13c2f6c0d4b169c6c3c7d632aa8b576/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230446f636b65722532304275696c6465722e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d626c616d65627574746f6e2532466c61726176656c2d646f636b65722d6275696c646572267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d4372656174652b446f636b657266696c65732b616e642b4b756265726e657465732b6d616e6966657374732b666f722b796f75722b6170706c69636174696f6e266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667267769647468733d6175746f)](https://camo.githubusercontent.com/a13917d77c646c76aff2a7d02bed1181c13c2f6c0d4b169c6c3c7d632aa8b576/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230446f636b65722532304275696c6465722e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d626c616d65627574746f6e2532466c61726176656c2d646f636b65722d6275696c646572267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d4372656174652b446f636b657266696c65732b616e642b4b756265726e657465732b6d616e6966657374732b666f722b796f75722b6170706c69636174696f6e266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667267769647468733d6175746f)

[![Packagist Version](https://camo.githubusercontent.com/666d9b9bbedad07c145e5a6d0b29440011dc90ccbba1933931ad46ac4abdabc3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c616d65627574746f6e2f6c61726176656c2d646f636b65722d6275696c646572)](https://packagist.org/packages/blamebutton/laravel-docker-builder)[![Packagist Downloads](https://camo.githubusercontent.com/112d53065722fb9ff0f3e5512fd87c8722c1364855dd2ee9c3743db9982fef85/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f626c616d65627574746f6e2f6c61726176656c2d646f636b65722d6275696c646572)](https://packagist.org/packages/blamebutton/laravel-docker-builder)[![GitHub Workflow Status](https://camo.githubusercontent.com/a8475ab9ee3e412e74fe993d4b34b1846513c5164a828e462f20a22d92f622f8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626c616d65627574746f6e2f6c61726176656c2d646f636b65722d6275696c6465722f706870756e69742e796d6c)](https://camo.githubusercontent.com/a8475ab9ee3e412e74fe993d4b34b1846513c5164a828e462f20a22d92f622f8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626c616d65627574746f6e2f6c61726176656c2d646f636b65722d6275696c6465722f706870756e69742e796d6c)

Features
--------

[](#features)

- Build Docker images using the Artisan CLI
- Detect PHP version and extensions
- Bundle assets with Vite.js or Laravel Mix
- Separate NGINX and PHP-FPM images
- [Deployment examples](/.examples/) for Kubernetes and Docker Compose

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

[](#installation)

```
composer require --dev blamebutton/laravel-docker-builder
```

Usage
-----

[](#usage)

### Detect Configuration

[](#detect-configuration)

```
php artisan docker:generate --detect
```

When `--detect` is passed to the `docker:generate` command, it will automatically detect the following requirements:

- PHP version, detected using the `php` version in your `composer.json`
- PHP extensions, detected using the configuration of your project:
    - Cache driver: Redis, Memcached, APC
    - Database driver: MySQL, Postgres, SQL Server
    - Broadcasting driver: Redis
    - Queue driver: Redis
    - Session driver: Redis, Memcached, APC
- Node package manager, detected using the existence of `package-lock.json` or `yarn.lock`
- Node build tool, detected using the existence of `vite.config.js` or `webpack.mix.js`

### Manual Configuration

[](#manual-configuration)

```
php artisan docker:generate
```

When no options are passed to `docker:generate`, a prompt is used to configure the project's requirements.

See all available options, and their supported values, by running `php artisan docker:generate --help`.

- `-p, --php-version` - PHP version for Docker image
- `-e, --php-extensions` - PHP extensions (comma-separated) to include in Docker image
- `-o, --optimize` - Run `php artisan optimize` on container start
- `-a, --alpine` - Use Alpine Linux based images
- `-m, --node-package-manager` - Install Node dependencies using NPM or Yarn
- `-b, --node-build-tool` - Run Vite.js or Laravel Mix build step

Configuration
-------------

[](#configuration)

### Option 1: Config File

[](#option-1-config-file)

```
php artisan vendor:publish --provider="BlameButton\LaravelDockerBuilder\DockerServiceProvider"
```

### Option 2: `.env`

[](#option-2-env)

By default, the configuration file reads the following environment variables to determine the Docker image tags.

```
DOCKER_NGINX_TAG=laravel-app:nginx
DOCKER_PHP_TAG=laravel-app:php
```

###  Health Score

39

—

LowBetter than 87% of packages

Maintenance62

Regular maintenance activity

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.2% 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 ~1 days

Total

7

Last Release

1158d ago

### Community

Maintainers

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

---

Top Contributors

[![bram-pkg](https://avatars.githubusercontent.com/u/13304739?v=4)](https://github.com/bram-pkg "bram-pkg (141 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

dockerdockerfilelaravelphplaravelimagedockergeneratekubernetes

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/blamebutton-laravel-docker-builder/health.svg)

```
[![Health](https://phpackages.com/badges/blamebutton-laravel-docker-builder/health.svg)](https://phpackages.com/packages/blamebutton-laravel-docker-builder)
```

###  Alternatives

[folklore/image

Image manipulation library for Laravel 5 based on Imagine and inspired by Croppa for easy url based manipulation

276248.0k5](/packages/folklore-image)[joshembling/image-optimizer

Optimize your Filament images before they reach your database.

111138.7k12](/packages/joshembling-image-optimizer)[urlbox/screenshots

Use urlbox to easily generate website thumbnail screenshots from a URL

11245.7k](/packages/urlbox-screenshots)[danihidayatx/image-optimizer

Optimize your Filament images before they reach your database. Forked from joshembling/image-optimizer for Filament v4 &amp; v5 support.

162.1k](/packages/danihidayatx-image-optimizer)

PHPackages © 2026

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