Den*_*nis 5 php laravel docker
这是命令的输出:
Step 5/7 : RUN ./vendor/bin/laravel new --force testapp
---> Running in dc92e378b12a
Crafting application...
[91m
[0m[91mIn Process.php line 1062:
TTY mode requires /dev/tty to be read/writable.
new [--dev] [--force] [--] [<name>]
[0mService 'cli' failed to build: The command '/bin/sh -c ./vendor/bin/laravel new --force testapp' returned a non-zero code: 1
[Pipeline] }
Run Code Online (Sandbox Code Playgroud)
这是我的 Docker 文件:
$ cat Dockerfile.cli
FROM php:7.2-cli
COPY composer.json /app/
COPY scripts /app/scripts
RUN composer install --no-dev
RUN ./vendor/bin/laravel new --force testapp
# Define where the Drupal Root is located
ENV WEBROOT=web
Run Code Online (Sandbox Code Playgroud)
如何自动构建一个 Laravel 镜像并安装一组特定的软件包来进行一些测试?
我发现工作正常的唯一解决方案是放弃laravel命令并使用以下命令执行此操作composer:
RUN composer create-project --prefer-dist laravel/laravel testapp。
| 归档时间: |
|
| 查看次数: |
4761 次 |
| 最近记录: |