docker-compose构建 | docker-compose build
docker-compose 构建
Usage: build [options] [--build-arg key=val...] [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.
--build-arg key=val Set build-time variables for one service.
服务构建一次,然后标记,默认为project_service
。例如composetest_db
。如果 Compose 文件指定图像名称,则图像将使用该名称进行标记,预先替换任何变量。请参阅变量替换
如果更改服务的 Dockerfile 或其构建目录的内容,请运行docker-compose build
重建它。
fig, composition, compose
, docker, orchestration, cli, build