mirror of
https://github.com/docker/compose.git
synced 2025-07-25 14:44:29 +02:00
Allow pulls from an insecure registry
Signed-off-by: Jason Bernardino Alonso <jalonso@luminoso.com>
This commit is contained in:
parent
5d76d183b4
commit
1c5194e2ec
@ -213,9 +213,17 @@ class TopLevelCommand(Command):
|
|||||||
"""
|
"""
|
||||||
Pulls images for services.
|
Pulls images for services.
|
||||||
|
|
||||||
Usage: pull [SERVICE...]
|
Usage: pull [options] [SERVICE...]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--allow-insecure-ssl Allow insecure connections to the docker
|
||||||
|
registry
|
||||||
"""
|
"""
|
||||||
project.pull(service_names=options['SERVICE'])
|
insecure_registry = options['--allow-insecure-ssl']
|
||||||
|
project.pull(
|
||||||
|
service_names=options['SERVICE'],
|
||||||
|
insecure_registry=insecure_registry
|
||||||
|
)
|
||||||
|
|
||||||
def rm(self, project, options):
|
def rm(self, project, options):
|
||||||
"""
|
"""
|
||||||
|
@ -180,9 +180,9 @@ class Project(object):
|
|||||||
|
|
||||||
return running_containers
|
return running_containers
|
||||||
|
|
||||||
def pull(self, service_names=None):
|
def pull(self, service_names=None, insecure_registry=False):
|
||||||
for service in self.get_services(service_names, include_links=True):
|
for service in self.get_services(service_names, include_links=True):
|
||||||
service.pull()
|
service.pull(insecure_registry=insecure_registry)
|
||||||
|
|
||||||
def remove_stopped(self, service_names=None, **options):
|
def remove_stopped(self, service_names=None, **options):
|
||||||
for service in self.get_services(service_names):
|
for service in self.get_services(service_names):
|
||||||
|
@ -413,10 +413,13 @@ class Service(object):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def pull(self):
|
def pull(self, insecure_registry=False):
|
||||||
if 'image' in self.options:
|
if 'image' in self.options:
|
||||||
log.info('Pulling %s (%s)...' % (self.name, self.options.get('image')))
|
log.info('Pulling %s (%s)...' % (self.name, self.options.get('image')))
|
||||||
self.client.pull(self.options.get('image'))
|
self.client.pull(
|
||||||
|
self.options.get('image'),
|
||||||
|
insecure_registry=insecure_registry
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
NAME_RE = re.compile(r'^([^_]+)_([^_]+)_(run_)?(\d+)$')
|
NAME_RE = re.compile(r'^([^_]+)_([^_]+)_(run_)?(\d+)$')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user