PHPackages                             janole/laravel-dockerize - 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. janole/laravel-dockerize

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

janole/laravel-dockerize
========================

A very simple tool to containerize your Laravel app

1.3.6(1y ago)42.4k2[1 PRs](https://github.com/janole/laravel-dockerize/pulls)MITPHPPHP ^7.4|^8.0|^8.1|^8.2|8.3CI failing

Since May 19Pushed 1y ago3 watchersCompare

[ Source](https://github.com/janole/laravel-dockerize)[ Packagist](https://packagist.org/packages/janole/laravel-dockerize)[ RSS](/packages/janole-laravel-dockerize/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (3)Versions (72)Used By (0)

laravel-dockerize
=================

[](#laravel-dockerize)

A very simple tool to containerize your Laravel App ...

What? Why?
----------

[](#what-why)

Do you want to easily create a Docker image from your Laravel App? Then this project wants to become your friend ;-)

> !! NOTICE !! So far, this project is severely limited to some base dependencies (like PostgreSQL for example.)

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

[](#installation)

```
$ composer require janole/laravel-dockerize
```

Usage
-----

[](#usage)

**1. First, you need to specify the (base-)name of the docker image**. Add the following variable to your `.env` file:

```
DOCKERIZE_IMAGE="my-shiny-new-app"

```

or

```
DOCKERIZE_IMAGE="my-own.docker-registry.com/my-shiny-new-app"

```

> If you're using git, `laravel-dockerize` will try to automatically add some version and branch tags to the image name.

**2. Now build the image:**

```
$ php artisan docker:build
cd /Users/ole/projects/Laravel/test-app && docker build -t my-shiny-new-app:0.1-master .
...
* Successfully tagged my-shiny-new-app:0.1-master
```

Yay! Now you've got your first image named `my-shiny-new-app:0.1-master`

> !! NOTICE !! The Dockerfile used to create the image will be automatically saved in your project's root.

**3. Create a docker-compose.yml file in the project root:**

```
$ php artisan docker:compose -s
File saved as /Users/ole/projects/Laravel/test-app/docker-compose.yml
```

**4. Run the project via docker-compose:**

```
$ docker-compose up [-d]
Creating network "test-app_default" with the default driver
Creating volume "test-app_postgres-data" with default driver
Creating test-app_database_1 ... done
Creating test-app_app_1      ... done
```

### Internals ...

[](#internals-)

- **laravel-dockerize** will add another *artisan* command to your project: `container:startup`. This command will be automatically called each time the container is (re-)started and it will try to initialize the database for you. For this, it will wait for the database to be ready, call `php artisan migrate --force` and then try to run the initial seeders `DOCKERIZE_SEED1` or updating seeders `DOCKERIZE_SEED2` (if the database wasn't fresh.)

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance40

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 71.4% 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 ~32 days

Total

64

Last Release

503d ago

Major Versions

0.3.31 → 1.0.12021-01-15

0.x-dev → 1.0.72021-05-06

PHP version history (5 changes)0.2.22PHP ^7.1

1.0.2PHP ^7.1|^8.0

1.1.1-BETAPHP ^7.1|^8.0|^8.1

1.2.8PHP ^7.1|^8.0|^8.1|^8.2|8.3

1.3.0PHP ^7.4|^8.0|^8.1|^8.2|8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/75067d4a9c12f733986115dab9301ab8c43faf179f9e15a373438b60edc679cb?d=identicon)[janole](/maintainers/janole)

---

Top Contributors

[![janole](https://avatars.githubusercontent.com/u/1439712?v=4)](https://github.com/janole "janole (95 commits)")[![rocketole](https://avatars.githubusercontent.com/u/170500402?v=4)](https://github.com/rocketole "rocketole (37 commits)")[![ckappelhoff](https://avatars.githubusercontent.com/u/4416908?v=4)](https://github.com/ckappelhoff "ckappelhoff (1 commits)")

---

Tags

containerizedockerdockerizelaravellaravel-dockerizephplaraveldockerdockerizecontainerize

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/janole-laravel-dockerize/health.svg)

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

###  Alternatives

[neo/little-sail

Smaller Alpine based image for Laravel Sail runtimes

389.0k](/packages/neo-little-sail)[downtoworld/laravel-devops

Laravel Cloudflare-Tunnels Ready Production Docker-Compose

161.1k](/packages/downtoworld-laravel-devops)

PHPackages © 2026

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