1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-22 21:03:00 +00:00
kiwi-scp/src/kiwi/subcommands/pull.py

21 lines
618 B
Python
Raw Normal View History

2020-08-18 12:37:07 +00:00
# local
from ._subcommand import ServiceCommand
2020-08-18 12:37:07 +00:00
from .utils.dockercommand import DockerCommand
class PullCommand(ServiceCommand):
2020-08-18 12:37:07 +00:00
"""kiwi pull"""
def __init__(self):
super().__init__(
'pull', num_projects='?', num_services='*',
action="Pulling images for",
2020-08-18 12:37:07 +00:00
description="Pull images for the whole instance, a project or service(s) inside a project"
)
def _run_services(self, runner, args, project, services):
DockerCommand('docker-compose').run(project, [
'pull', '--ignore-pull-failures', *services
])
2020-08-18 12:37:07 +00:00
return True