diff --git a/compose/cli/main.py b/compose/cli/main.py index 39178fb3c..b0ffd2f6c 100644 --- a/compose/cli/main.py +++ b/compose/cli/main.py @@ -934,6 +934,7 @@ class TopLevelCommand(object): print new container names. Incompatible with --abort-on-container-exit. --no-color Produce monochrome output. + --quiet-pull Pull without printing progress information --no-deps Don't start linked services. --force-recreate Recreate containers even if their configuration and image haven't changed. @@ -998,7 +999,8 @@ class TopLevelCommand(object): start=not no_start, always_recreate_deps=always_recreate_deps, 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: diff --git a/compose/project.py b/compose/project.py index 5c7244493..2cbc4aeea 100644 --- a/compose/project.py +++ b/compose/project.py @@ -446,7 +446,9 @@ class Project(object): start=True, always_recreate_deps=False, reset_container_image=False, - renew_anonymous_volumes=False): + renew_anonymous_volumes=False, + silent=False, + ): self.initialize() if not ignore_orphans: @@ -460,7 +462,7 @@ class Project(object): include_deps=start_deps) 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( services, strategy, always_recreate_deps=always_recreate_deps) scaled_services = self.get_scaled_services(services, scale_override) diff --git a/compose/service.py b/compose/service.py index f79a46962..3918a19e8 100644 --- a/compose/service.py +++ b/compose/service.py @@ -305,7 +305,7 @@ class Service(object): raise OperationFailedError("Cannot create container for service %s: %s" % (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: self.build() return @@ -317,7 +317,7 @@ class Service(object): pass if not self.can_be_built(): - self.pull() + self.pull(silent=silent) return if do_build == BuildAction.skip: