&引用;docker compose build“;在指定文件时显示帮助文本

&引用;docker compose build“;在指定文件时显示帮助文本,docker,yaml,docker-compose,Docker,Yaml,Docker Compose,在生成期间指定合成文件时: docker compose build-f compose production.yml 图像不会生成,而是显示帮助文本: $ docker-compose build -f compose-production.yml Build or rebuild services. Services are built once and then tagged as `project_service`, e.g. `composetest_db`. If you cha

在生成期间指定合成文件时:

docker compose build-f compose production.yml

图像不会生成,而是显示帮助文本:

$ docker-compose build -f compose-production.yml 
Build or rebuild services.

Services are built once and then tagged as `project_service`,
e.g. `composetest_db`. If you change a service's `Dockerfile` or the
contents of its build directory, you can run `docker-compose build` to rebuild it.

Usage: build [options] [SERVICE...]

Options:
    --force-rm  Always remove intermediate containers.
    --no-cache  Do not use cache when building the image.
    --pull      Always attempt to pull a newer version of the image.
有人知道发生了什么吗?

使用以下工具运行:

docker-compose -f compose-production.yml build

-f
docker compose
的选项,而不是命令
构建的选项

docker compose构建
文档中找到这样的琐碎、困难:(