From 9b6f938d43cbafb5f1cf3872bbf884ece9e7ef26 Mon Sep 17 00:00:00 2001 From: Sink Date: Sun, 17 Nov 2024 18:57:12 +0800 Subject: [PATCH] docs: docker for dev --- README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a9e7751..ad178b2 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,31 @@ # Laravel Docker [![codecov](https://codecov.io/gh/laravel-fans/laravel-docker/branch/main/graph/badge.svg)](https://codecov.io/gh/laravel-fans/laravel-docker) +[![Packagist Downloads](https://img.shields.io/packagist/dt/laravel-fans/docker)](https://packagist.org/packages/laravel-fans/docker) +[![Docker Pulls](https://img.shields.io/docker/pulls/laravelfans/laravel)](https://hub.docker.com/r/laravelfans/laravel) [![Laravel 10](https://github.com/laravel-fans/laravel-docker/workflows/Laravel%2010/badge.svg)](https://github.com/laravel-fans/laravel-docker/actions/workflows/laravel-10.yml) [![Laravel 11](https://github.com/laravel-fans/laravel-docker/workflows/Laravel%2011/badge.svg)](https://github.com/laravel-fans/laravel-docker/actions/workflows/laravel-11.yml) -Full Laravel production environment for Docker. +Full Laravel production and development environment for Docker, based on the official image `php:apache`. -## install +## development or testing -Run in your Laravel project: +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. + +```shell +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. ```shell composer require --dev laravel-fans/docker php artisan docker:publish ``` -## build - Then you will find `Dockerfile` in your project, so you can build: ```