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 yesterday

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://www.gravatar.com/avatar/c2e396eba72d79cf9ae5c929ba6b93e11d962281e237f7519c11ca9d86a6fbea?d=identicon)[mattwills23](/maintainers/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

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

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

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

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