mirror of
https://github.com/docker/compose.git
synced 2025-07-20 20:24:30 +02:00
Update reference docs for the new flag.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
b7fb3a6d9b
commit
e1b87d7be0
@ -294,9 +294,9 @@ class Service(object):
|
|||||||
|
|
||||||
self.build()
|
self.build()
|
||||||
log.warn(
|
log.warn(
|
||||||
"Image for service {} was build because it was not found. To "
|
"Image for service {} was built because it did not already exist. To "
|
||||||
"rebuild this image you must use the `build` command or the "
|
"rebuild this image you must use `docker-compose build` or "
|
||||||
"--build flag.".format(self.name))
|
"`docker-compose up --build`.".format(self.name))
|
||||||
|
|
||||||
def image(self):
|
def image(self):
|
||||||
try:
|
try:
|
||||||
|
@ -12,14 +12,15 @@ parent = "smn_compose_cli"
|
|||||||
# create
|
# create
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Creates containers for a service.
|
||||||
|
|
||||||
Usage: create [options] [SERVICE...]
|
Usage: create [options] [SERVICE...]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--force-recreate Recreate containers even if their configuration and
|
--force-recreate Recreate containers even if their configuration and
|
||||||
image haven't changed. Incompatible with --no-recreate.
|
image haven't changed. Incompatible with --no-recreate.
|
||||||
--no-recreate If containers already exist, don't recreate them.
|
--no-recreate If containers already exist, don't recreate them.
|
||||||
Incompatible with --force-recreate.
|
Incompatible with --force-recreate.
|
||||||
--no-build Don't build an image, even if it's missing
|
--no-build Don't build an image, even if it's missing.
|
||||||
|
--build Build images before creating containers.
|
||||||
```
|
```
|
||||||
|
|
||||||
Creates containers for a service.
|
|
||||||
|
@ -15,22 +15,24 @@ parent = "smn_compose_cli"
|
|||||||
Usage: up [options] [SERVICE...]
|
Usage: up [options] [SERVICE...]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-d Detached mode: Run containers in the background,
|
-d Detached mode: Run containers in the background,
|
||||||
print new container names.
|
print new container names.
|
||||||
Incompatible with --abort-on-container-exit.
|
Incompatible with --abort-on-container-exit.
|
||||||
--no-color Produce monochrome output.
|
--no-color Produce monochrome output.
|
||||||
--no-deps Don't start linked services.
|
--no-deps Don't start linked services.
|
||||||
--force-recreate Recreate containers even if their configuration
|
--force-recreate Recreate containers even if their configuration
|
||||||
and image haven't changed.
|
and image haven't changed.
|
||||||
Incompatible with --no-recreate.
|
Incompatible with --no-recreate.
|
||||||
--no-recreate If containers already exist, don't recreate them.
|
--no-recreate If containers already exist, don't recreate them.
|
||||||
Incompatible with --force-recreate.
|
Incompatible with --force-recreate.
|
||||||
--no-build Don't build an image, even if it's missing
|
--no-build Don't build an image, even if it's missing.
|
||||||
--abort-on-container-exit Stops all containers if any container was stopped.
|
--build Build images before starting containers.
|
||||||
Incompatible with -d.
|
--abort-on-container-exit Stops all containers if any container was stopped.
|
||||||
-t, --timeout TIMEOUT Use this timeout in seconds for container shutdown
|
Incompatible with -d.
|
||||||
when attached or when containers are already
|
-t, --timeout TIMEOUT Use this timeout in seconds for container shutdown
|
||||||
running. (default: 10)
|
when attached or when containers are already
|
||||||
|
running. (default: 10)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Builds, (re)creates, starts, and attaches to containers for a service.
|
Builds, (re)creates, starts, and attaches to containers for a service.
|
||||||
|
@ -433,7 +433,7 @@ class ServiceTest(unittest.TestCase):
|
|||||||
service.create_container(do_build=BuildAction.none)
|
service.create_container(do_build=BuildAction.none)
|
||||||
assert mock_log.warn.called
|
assert mock_log.warn.called
|
||||||
_, args, _ = mock_log.warn.mock_calls[0]
|
_, args, _ = mock_log.warn.mock_calls[0]
|
||||||
assert 'was build because it was not found' in args[0]
|
assert 'was built because it did not already exist' in args[0]
|
||||||
|
|
||||||
self.mock_client.build.assert_called_once_with(
|
self.mock_client.build.assert_called_once_with(
|
||||||
tag='default_foo',
|
tag='default_foo',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user