laravel-fans / docker
Full Laravel production environment for Docker
Installs: 8 997
Dependents: 0
Suggesters: 0
Security: 0
Stars: 40
Watchers: 4
Forks: 13
Open Issues: 3
Requires
- laravel/framework: >=v10
Requires (Dev)
- orchestra/testbench: >=v3.5.6
- phpmd/phpmd: ^2.11
- squizlabs/php_codesniffer: ^3.6
README
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:11-dev docker run -v $(pwd):/var/www/laravel -it laravelfans/laravel:10-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
.