?
This document uses PHP Chinese website manual Release
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.
服務(wù)構(gòu)建一次,然后標(biāo)記,默認(rèn)為project_service
。例如composetest_db
。如果 Compose 文件指定圖像名稱,則圖像將使用該名稱進(jìn)行標(biāo)記,預(yù)先替換任何變量。請(qǐng)參閱變量替換
如果更改服務(wù)的 Dockerfile 或其構(gòu)建目錄的內(nèi)容,請(qǐng)運(yùn)行docker-compose build
重建它。