首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

docker-compose构建 | docker-compose build

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重建它。

扫码关注腾讯云开发者

领取腾讯云代金券