dockerfile 位于默认的 laravel sail 项目中的哪里

chr*_*ris 1 php laravel docker dockerfile laravel-sail

使用 laravel sail 文档构建 laravel 项目。正如 docker-compose.yml 文件中提到的,它提到了dockerfile: Dockerfile。但它并不位于根文件夹中,那么它在哪里呢?

# For more information: https://laravel.com/docs/sail
version: '3'
services:
    laravel.test:
        build:
            context: ./vendor/laravel/sail/runtimes/8.1
            **dockerfile: Dockerfile**
            args:
                WWWGROUP: '${WWWGROUP}'
        image: sail-8.1/app
        extra_hosts:
            - 'host.docker.internal:host-gateway'
        ports:
            - '${APP_PORT:-80}:80'
        environment:
            WWWUSER: '${WWWUSER}'
            LARAVEL_SAIL: 1
            XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
            XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
        volumes:
            - '.:/var/www/html'
        networks:
            - sail
        depends_on:
            - mysql
            - redis
            - meilisearch
            - selenium
Run Code Online (Sandbox Code Playgroud)

小智 9

要在应用程序中自定义 Dockerfile,您可以使用以下命令在应用程序目录中发布供应商文件:

sail artisan sail:publish
Run Code Online (Sandbox Code Playgroud)

更多信息请参阅:https://laravel.com/docs/9.x/sail#sail-customization


Roj*_*men 6

它位于以下路径context./vendor/laravel/sail/runtimes/8.1/Dockerfile

请参阅:https ://github.com/laravel/sail/blob/1.x/runtimes/8.1/Dockerfile