Looking to hire Laravel developers? Try LaraJobs

docker maintained by laravel-fans

Description
Full Laravel production environment for Docker
Author
Last update
2025/12/29 10:25 (dev-main)
License
Links
Downloads
11 402

Comments
comments powered by Disqus

Laravel Docker

codecov Packagist Downloads Docker Pulls Laravel 11 Laravel 12

Full Laravel production and development environment for Docker, based on the official image php:apache.

development or testing

It is recommended to use this docker image in your testing environment(amd64 or arm64, support Apple silicon), it contains git/jq/vim/nodejs/npm, and php extensions: gd/mysql/pgsql/redis/xdebug.

docker run -p 8000:80 -v $(pwd):/var/www/laravel laravelfans/laravel:12-dev
docker run -v $(pwd):/var/www/laravel -it laravelfans/laravel:12-dev bash

production

It is recommended to use Dockerfile to build your own docker image in your production environment.

composer require --dev laravel-fans/docker
php artisan docker:publish

Then you will find Dockerfile in your project, so you can build:

docker build -t laravel-demo .
docker run -it laravel-demo
docker run -p 8000:80 -e "APP_ENV=local" -e "DB_CONNECTION=sqlite" \
  -e "APP_KEY=base64:L+3avOYCfuq8nnDpHs74+5Et3sx27TssucHQIyqfpDY=" \
  -it laravel-demo

Feel free to change the Dockerfile.

screenshots

docker run laravel