PHPackages                             mortenscheel/docker-laravel - 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. [CLI &amp; Console](/categories/cli)
4. /
5. mortenscheel/docker-laravel

AbandonedArchivedProject[CLI &amp; Console](/categories/cli)

mortenscheel/docker-laravel
===========================

Docker helper for Laravel projects

v0.11.0(1y ago)187[6 issues](https://github.com/mortenscheel/docker-laravel/issues)MITPHPPHP ^8.4

Since Nov 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mortenscheel/docker-laravel)[ Packagist](https://packagist.org/packages/mortenscheel/docker-laravel)[ Docs](https://github.com/mortenscheel/laravel-docker)[ RSS](/packages/mortenscheel-docker-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (10)Versions (43)Used By (0)

Docker Laravel
==============

[](#docker-laravel)

A CLI tool to initialize and manage a Docker environment for a Laravel project.

Why?
----

[](#why)

I liked the simplicity of Laravel Sail, but wanted to have an actual web-server, in stead of just `artisan serve`.

How?
----

[](#how)

In stead of a simple bash script like sail, I built this as a Laravel Zero app in order to take advantage of the functionality from Symfony Commands and Processes.

The first argument provided to docker-laravel is used to determine *where* to send the command (most commands are sent to the app container, but compose commands like `up`, `build` and `pull` are run on the host).

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

[](#installation)

```
composer global require mortenscheel/docker-laravel
```

Or download `builds/docker-laravel` and place in PATH.

Usage
-----

[](#usage)

I recommend creating an alias to make everyday use simpler.

```
alias d="~/.composer/vendor/bin/docker-laravel"
```

### Initialize project

[](#initialize-project)

```
d init --help

Description:
  Initialize Docker environment

Usage:
  init [options]

Options:
      --slug[=SLUG]     Slug used for container prefix
      --php[=PHP]       PHP-FPM version [default: "8.2"]
      --node[=NODE]     NodeJS version [default: "20"]
      --redis           Include Redis service
      --meilisearch     Include Meilisearch service
      --selenium        Include Selenium service
      --update          Update existing environment
```

This will copy the `/docker` folder and `/docker-compose.yml` to your project It will also update your `.env` (after you've approved the changes)

### Proxied commands

[](#proxied-commands)

When you run the command inside an initialized Laravel project, docker-laravel will automatically proxy the commands. **Examples**

```
d up -d # runs docker compose up -d. All compose commands are supported
d composer require foo/bar # Commands starting with composer are sent to composer in the app container
d artisan route:list # Sent to artisan in the app container
d a route:list # a is aliased to artisan
d route:list # if the first param includes a colon, it's interpreted as an artisan command
d debug some:command # Runs some:command in Artisan with xdebug enabled
d xdebug on/off/status # Controls xdebug in the app container
d shell/zsh/bash # Enter the app container as the non-root (laravel) user
d root-shell # Enter app as root
```

Note: this documentation is a work in progress. To see all the available subcommands and features, take a look at `DefaultCommand`

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~22 days

Recently: every ~151 days

Total

42

Last Release

377d ago

PHP version history (3 changes)v0.1PHP ^8.0

v0.5PHP ^8.1

v0.11.0PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6514342?v=4)[Morten Scheel](/maintainers/mortenscheel)[@mortenscheel](https://github.com/mortenscheel)

---

Top Contributors

[![mortenscheel](https://avatars.githubusercontent.com/u/6514342?v=4)](https://github.com/mortenscheel "mortenscheel (90 commits)")

---

Tags

dockerlaravelcliconsolelaraveldocker

###  Code Quality

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[nunomaduro/laravel-console-dusk

Laravel Console Dusk allows the usage of Laravel Dusk in Laravel/Laravel Zero artisan commands.

16255.4k7](/packages/nunomaduro-laravel-console-dusk)

PHPackages © 2026

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