docker compose build
内容説明 | Build or rebuild services |
---|---|
利用方法 | docker compose build [OPTIONS] [SERVICE...] |
内容説明
Services are built once and then tagged, by default as project-service
.
If the Compose file specifies an image name, the image is tagged with that name, substituting any variables beforehand. See variable interpolation.
If you change a service's Dockerfile
or the contents of its build directory,
run docker compose build
to rebuild it.
オプション
オプション | デフォルト | 内容説明 |
---|---|---|
--build-arg | Set build-time variables for services | |
--builder | Set builder to use | |
-m, --memory | Set memory limit for the build container. Not supported by BuildKit. | |
--no-cache | Do not use cache when building the image | |
--pull | Always attempt to pull a newer version of the image | |
--push | Push service images | |
-q, --quiet | Don't print anything to STDOUT | |
--ssh | Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent) | |
--with-dependencies | Also build dependencies (transitively) |