laravel sail没有在我的macbook m1上运行

t8e9dugd  于 2021-10-10  发布在  Java
关注(0)|答案(0)|浏览(297)

我试着在我的mac m1电脑上使用laravel 8 sail。我已经成功安装了docker,PHP7.4,并使用composer安装了laravel。我正试图使用帆,但我被卡在上面的部分
无法打开输入文件:/var/www/html/artisan
详情如下:
这是docker文件:


# For more information: https://laravel.com/docs/sail

version: '3'
services:
    laravel.test:
        build:
            context: ./vendor/laravel/sail/runtimes/7.4
            dockerfile: Dockerfile
            args:
                WWWGROUP: '${WWWGROUP}'
        image: sail-8.0/app
        ports:
            - '${APP_PORT:-80}:80'
        environment:
            WWWUSER: '${WWWUSER}'
            LARAVEL_SAIL: 1
        volumes:
            - '.:/var/www/html'
        networks:
            - sail
        depends_on:
            - mariadb
    mariadb:
        image: 'mariadb:10'
        ports:
            - '${FORWARD_DB_PORT:-3306}:3306'
        environment:
            MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
            MYSQL_DATABASE: '${DB_DATABASE}'
            MYSQL_USER: '${DB_USERNAME}'
            MYSQL_PASSWORD: '${DB_PASSWORD}'
            MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
        volumes:
            - 'sailmariadb:/var/lib/mysql'
        networks:
            - sail
        healthcheck:
          test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
          retries: 3
          timeout: 5s
networks:
    sail:
        driver: bridge
volumes:
    sailmariadb:
        driver: local

在我的rosetta终端上运行命令./vendor/bin/sail up后,我得到以下错误:

laravel.test_1  | 2021-07-26 18:19:35,319 INFO Set uid to user 0 succeeded
laravel.test_1  | 2021-07-26 18:19:35,320 INFO supervisord started with pid 17
laravel.test_1  | 2021-07-26 18:19:36,332 INFO spawned: 'php' with pid 18
laravel.test_1  | Could not open input file: /var/www/html/artisan
laravel.test_1  | 2021-07-26 18:19:36,383 INFO exited: php (exit status 1; not expected)
laravel.test_1  | 2021-07-26 18:19:37,395 INFO spawned: 'php' with pid 19
laravel.test_1  | Could not open input file: /var/www/html/artisan
laravel.test_1  | 2021-07-26 18:19:37,433 INFO exited: php (exit status 1; not expected)
laravel.test_1  | 2021-07-26 18:19:39,447 INFO spawned: 'php' with pid 20
laravel.test_1  | Could not open input file: /var/www/html/artisan
laravel.test_1  | 2021-07-26 18:19:39,483 INFO exited: php (exit status 1; not expected)
laravel.test_1  | 2021-07-26 18:19:42,501 INFO spawned: 'php' with pid 21
laravel.test_1  | Could not open input file: /var/www/html/artisan
laravel.test_1  | 2021-07-26 18:19:42,538 INFO exited: php (exit status 1; not expected)
laravel.test_1  | 2021-07-26 18:19:43,543 INFO gave up: php entered FATAL state, too many start retries too quickly

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题