PHPackages                             mattwills23/laravel-preset-docker - 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. mattwills23/laravel-preset-docker

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

mattwills23/laravel-preset-docker
=================================

A Laravel preset that sets up a Docker-based local development environment.

03PHP

Since Feb 13Pushed 7y agoCompare

[ Source](https://github.com/mattwills23/laravel-preset-docker)[ Packagist](https://packagist.org/packages/mattwills23/laravel-preset-docker)[ RSS](/packages/mattwills23-laravel-preset-docker/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Preset: Docker
======================

[](#laravel-preset-docker)

Set up a Docker-based local development environment for your Laravel project with an artisan preset command.

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

[](#whats-included)

Default:

- PHP 7.2
- Nginx
- MySQL
- Node

Optional:

- Redis
- Mailhog

Prerequisites
-------------

[](#prerequisites)

You should have Docker installed on your machine and be familiar with `docker-compose` commands. [Read an overview of the docker-compose CLI](https://docs.docker.com/compose/reference/overview/)

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

[](#installation)

1. Install the package via composer:

    ```
    composer require --dev mattwills23/laravel-preset-docker
    ```
2. Run the `preset` command with the `docker` option:

    ```
    php artisan preset docker
    ```

Usage
-----

[](#usage)

- You will interact with the environment using `docker-compose` commands
- Once your environment is running your application will be available at

### Basics

[](#basics)

- Start the environment:

    ```
     docker-compose up -d
    ```
- Stop the environment:

    ```
     docker-compose down
    ```
- Use artisan:

    ```
     docker-compose exec app php artisan
    ```
- Use composer:

    ```
     docker-compose exec app composer
    ```
- Use npm:

    ```
     docker-compose exec node npm
    ```
- Run tests:

    ```
     docker-compose exec app phpunit
    ```
- See a list of available commands:

    ```
     docker-compose --help
    ```

Notes
-----

[](#notes)

I originally planned on releasing this as part of a Laravel project "starter" repo, containing a Laravel installation, this docker setup, my go-to packages, etc. Instead I'm going to break that repo down into multiple presets. This should be more useful to the community as you can then pick and choose which presets to use, and you'll be able to install this docker setup on projects already underway.

Be on the lookout for the the following presets that I plan on releasing:

- mattwills23/laravel-preset-docker
- mattwills23/laravel-preset-utilities
- mattwills23/laravel-preset-backend
- mattwills23/laravel-preset-frontend

And a "starter" preset which will install all of my presets in a single command.

- mattwills23/laravel-preset-starter

Acknowledgments
---------------

[](#acknowledgments)

- I got the idea of using a preset instead of a personal "starter" repo from [TJ Miller](https://github.com/sixlive)
    - His take on the concept:

License
-------

[](#license)

This project is licensed under the MIT License - see the LICENSE.md file for details

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26020585?v=4)[Matt Williams](/maintainers/mattwills23)[@mattwills23](https://github.com/mattwills23)

---

Top Contributors

[![mattwills23](https://avatars.githubusercontent.com/u/26020585?v=4)](https://github.com/mattwills23 "mattwills23 (6 commits)")

---

Tags

dockerlaravelpreset

### Embed Badge

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

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

###  Alternatives

[ryoluo/sail-ssl

Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.

193739.0k3](/packages/ryoluo-sail-ssl)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4676.9k](/packages/tiamo-phpas2)[wapmorgan/php-rpm-packager

RPM packager for PHP applications.

116.5k](/packages/wapmorgan-php-rpm-packager)

PHPackages © 2026

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