2015-07-17 02:30:49 +02:00
|
|
|
<!--[metadata]>
|
|
|
|
+++
|
|
|
|
title = "build"
|
|
|
|
description = "build"
|
|
|
|
keywords = ["fig, composition, compose, docker, orchestration, cli, build"]
|
|
|
|
[menu.main]
|
2015-07-19 23:39:25 +02:00
|
|
|
identifier="build.compose"
|
2015-07-17 02:30:49 +02:00
|
|
|
parent = "smn_compose_cli"
|
|
|
|
+++
|
|
|
|
<![end-metadata]-->
|
|
|
|
|
|
|
|
# build
|
|
|
|
|
|
|
|
```
|
|
|
|
Usage: build [options] [SERVICE...]
|
|
|
|
|
|
|
|
Options:
|
2015-10-27 10:00:51 +01:00
|
|
|
--force-rm Always remove intermediate containers.
|
2015-07-17 02:30:49 +02:00
|
|
|
--no-cache Do not use cache when building the image.
|
2015-09-14 15:02:15 +02:00
|
|
|
--pull Always attempt to pull a newer version of the image.
|
2015-07-17 02:30:49 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
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
|
2015-08-24 21:25:25 +02:00
|
|
|
build directory, run `docker-compose build` to rebuild it.
|