gpt4 book ai didi

docker - 当我指定文件时,"docker-compose build"向我显示帮助文本

转载 作者:行者123 更新时间:2023-12-02 09:45:13 26 4
gpt4 key购买 nike

当我在构建期间指定撰写文件时:

docker-compose build -f compose-product.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

-fdocker-compose 的选项,而不是命令 build 的选项

关于docker - 当我指定文件时,"docker-compose build"向我显示帮助文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36055771/

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