mirror of https://github.com/docker/compose.git
Merge pull request #5702 from mnottale/up-quiet
Add '--quiet' option to 'up' to pull silently.
This commit is contained in:
commit
a0cbb68e2f
|
@ -934,6 +934,7 @@ class TopLevelCommand(object):
|
||||||
print new container names. Incompatible with
|
print new container names. Incompatible with
|
||||||
--abort-on-container-exit.
|
--abort-on-container-exit.
|
||||||
--no-color Produce monochrome output.
|
--no-color Produce monochrome output.
|
||||||
|
--quiet-pull Pull without printing progress information
|
||||||
--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.
|
||||||
|
@ -998,7 +999,8 @@ class TopLevelCommand(object):
|
||||||
start=not no_start,
|
start=not no_start,
|
||||||
always_recreate_deps=always_recreate_deps,
|
always_recreate_deps=always_recreate_deps,
|
||||||
reset_container_image=rebuild,
|
reset_container_image=rebuild,
|
||||||
renew_anonymous_volumes=options.get('--renew-anon-volumes')
|
renew_anonymous_volumes=options.get('--renew-anon-volumes'),
|
||||||
|
silent=options.get('--quiet-pull'),
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -446,7 +446,9 @@ class Project(object):
|
||||||
start=True,
|
start=True,
|
||||||
always_recreate_deps=False,
|
always_recreate_deps=False,
|
||||||
reset_container_image=False,
|
reset_container_image=False,
|
||||||
renew_anonymous_volumes=False):
|
renew_anonymous_volumes=False,
|
||||||
|
silent=False,
|
||||||
|
):
|
||||||
|
|
||||||
self.initialize()
|
self.initialize()
|
||||||
if not ignore_orphans:
|
if not ignore_orphans:
|
||||||
|
@ -460,7 +462,7 @@ class Project(object):
|
||||||
include_deps=start_deps)
|
include_deps=start_deps)
|
||||||
|
|
||||||
for svc in services:
|
for svc in services:
|
||||||
svc.ensure_image_exists(do_build=do_build)
|
svc.ensure_image_exists(do_build=do_build, silent=silent)
|
||||||
plans = self._get_convergence_plans(
|
plans = self._get_convergence_plans(
|
||||||
services, strategy, always_recreate_deps=always_recreate_deps)
|
services, strategy, always_recreate_deps=always_recreate_deps)
|
||||||
scaled_services = self.get_scaled_services(services, scale_override)
|
scaled_services = self.get_scaled_services(services, scale_override)
|
||||||
|
|
|
@ -305,7 +305,7 @@ class Service(object):
|
||||||
raise OperationFailedError("Cannot create container for service %s: %s" %
|
raise OperationFailedError("Cannot create container for service %s: %s" %
|
||||||
(self.name, ex.explanation))
|
(self.name, ex.explanation))
|
||||||
|
|
||||||
def ensure_image_exists(self, do_build=BuildAction.none):
|
def ensure_image_exists(self, do_build=BuildAction.none, silent=False):
|
||||||
if self.can_be_built() and do_build == BuildAction.force:
|
if self.can_be_built() and do_build == BuildAction.force:
|
||||||
self.build()
|
self.build()
|
||||||
return
|
return
|
||||||
|
@ -317,7 +317,7 @@ class Service(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not self.can_be_built():
|
if not self.can_be_built():
|
||||||
self.pull()
|
self.pull(silent=silent)
|
||||||
return
|
return
|
||||||
|
|
||||||
if do_build == BuildAction.skip:
|
if do_build == BuildAction.skip:
|
||||||
|
|
Loading…
Reference in New Issue