gpt4 book ai didi

php - 自动创建 Laravel 项目失败,错误 : TTY mode requires/dev/tty to be read/writable

转载 作者:行者123 更新时间:2023-12-02 18:19:59 26 4
gpt4 key购买 nike

这是命令的输出:

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] }

这是我的 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

如何使用安装的一组特定软件包自动构建 Laravel 镜像以进行一些测试?

最佳答案

我发现工作正常的唯一解决方案是放弃 laravel命令并使用 composer 执行此操作:
RUN composer create-project --prefer-dist laravel/laravel testapp .

关于php - 自动创建 Laravel 项目失败,错误 : TTY mode requires/dev/tty to be read/writable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55725122/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com