From 48d093697ddd10bfd4d9be495763e64fdcc5eba6 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Wed, 20 May 2020 10:45:39 +0200 Subject: [PATCH 1/2] Fix flake8 errors Signed-off-by: Ulysses Souza --- compose/cli/main.py | 2 +- compose/service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compose/cli/main.py b/compose/cli/main.py index e226a6008..250d06c90 100644 --- a/compose/cli/main.py +++ b/compose/cli/main.py @@ -1080,7 +1080,7 @@ class TopLevelCommand(object): log.error( "The image for the service you're trying to recreate has been removed. " "If you continue, volume data could be lost. Consider backing up your data " - "before continuing.\n".format(e.explanation) + "before continuing.\n" ) res = yesno("Continue with the new image? [yN]", False) if res is None or not res: diff --git a/compose/service.py b/compose/service.py index 92b2b3329..95a87d210 100644 --- a/compose/service.py +++ b/compose/service.py @@ -1157,7 +1157,7 @@ class Service(object): container_name = build_container_name( self.project, service_name, number, slug, ) - ext_links_origins = [l.split(':')[0] for l in self.options.get('external_links', [])] + ext_links_origins = [link.split(':')[0] for link in self.options.get('external_links', [])] if container_name in ext_links_origins: raise DependencyError( 'Service {0} has a self-referential external link: {1}'.format( From 8034c96d6605386df9628a17350f4a8c7c01f499 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Fri, 29 May 2020 10:11:45 +0200 Subject: [PATCH 2/2] Bump docker-py This should fix https problems when running on remote daemon Signed-off-by: Ulysses Souza --- compose/cli/docker_client.py | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compose/cli/docker_client.py b/compose/cli/docker_client.py index d4cdc96e8..4553eee86 100644 --- a/compose/cli/docker_client.py +++ b/compose/cli/docker_client.py @@ -31,7 +31,7 @@ def default_cert_path(): def make_context(host, options, environment): tls = tls_config_from_options(options, environment) - ctx = Context("compose", host=host) + ctx = Context("compose", host=host, tls=tls.verify if tls else False) if tls: ctx.set_endpoint("docker", host, tls, skip_tls_verify=not tls.verify) return ctx @@ -138,7 +138,7 @@ def docker_client(environment, version=None, context=None, tls_version=None): tls = kwargs.get("tls", None) verify = False if not tls else tls.verify if host: - context = Context("compose", host=host) + context = Context("compose", host=host, tls=verify) else: context = ContextAPI.get_current_context() if tls: diff --git a/requirements.txt b/requirements.txt index 1845798b0..3c86344d9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ certifi==2020.4.5.1 chardet==3.0.4 colorama==0.4.3; sys_platform == 'win32' distro==1.5.0 -docker==4.2.0 +docker==4.2.1 docker-pycreds==0.4.0 dockerpty==0.4.1 docopt==0.6.2