|
@@ -17,8 +17,10 @@ docker run --rm -it -v $(pwd):/var/www/html -p 9000:80 php:5.6.38-apache
|
|
|
开发环境需要 composer,启动下面容器即可:
|
|
|
```bash
|
|
|
#php8+xdebug+composer
|
|
|
-docker run --rm -it -v $(pwd):/var/www/html -p 8000:8000 sineverba/php8xc:1.18.0 /bin/bash
|
|
|
-
|
|
|
+mkdir -p php-demo
|
|
|
+chmod 777 php-demo && cd php-demo
|
|
|
+docker run --rm -it -w /var/www/html -v $(pwd):/var/www/html -p 8000:8000 sineverba/php8xc:1.18.0 /bin/bash
|
|
|
+cd /var/www/html
|
|
|
```
|
|
|
|
|
|
laravel 项目使用下面容器,可以添加 `docker-compose.yaml` 配置一并启动数据库:
|
|
@@ -41,9 +43,9 @@ docker run -d --name laravel \
|
|
|
|
|
|
php 命令行项目工具:
|
|
|
```
|
|
|
-docker run --rm -it -v $(pwd):/var/www/html -v $(pwd)/Downloads:/root/Downloads/MusicDL/ -p 9000:80 php:8.1.8-apache /bin/bash
|
|
|
+docker run --rm -it -w /var/www/html -v $(pwd):/var/www/html -v $(pwd)/Downloads:/root/Downloads/MusicDL/ -p 9000:80 php:8.1.8-apache /bin/bash
|
|
|
|
|
|
-docker run --rm -it -v /workspace:/app php:7.4 /bin/bash
|
|
|
+docker run --rm -it -w /var/www/html -v /workspace:/app php:7.4 /bin/bash
|
|
|
|
|
|
thinkphp new demo
|
|
|
thinkphp serve
|