mirror of
https://github.com/docker/compose.git
synced 2025-07-27 23:54:04 +02:00
Use docker-py's default api version for engine queries
Bump docker-py version to 4.3.1 Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
parent
dfd5ff396a
commit
0dad2367e6
@ -6,7 +6,6 @@ from . import errors
|
|||||||
from .. import config
|
from .. import config
|
||||||
from .. import parallel
|
from .. import parallel
|
||||||
from ..config.environment import Environment
|
from ..config.environment import Environment
|
||||||
from ..const import API_VERSIONS
|
|
||||||
from ..const import LABEL_CONFIG_FILES
|
from ..const import LABEL_CONFIG_FILES
|
||||||
from ..const import LABEL_ENVIRONMENT_FILE
|
from ..const import LABEL_ENVIRONMENT_FILE
|
||||||
from ..const import LABEL_WORKING_DIR
|
from ..const import LABEL_WORKING_DIR
|
||||||
@ -127,9 +126,7 @@ def get_project(project_dir, config_path=None, project_name=None, verbose=False,
|
|||||||
)
|
)
|
||||||
config_data = config.load(config_details, interpolate)
|
config_data = config.load(config_details, interpolate)
|
||||||
|
|
||||||
api_version = environment.get(
|
api_version = environment.get('COMPOSE_API_VERSION')
|
||||||
'COMPOSE_API_VERSION',
|
|
||||||
API_VERSIONS[config_data.version])
|
|
||||||
|
|
||||||
client = get_client(
|
client = get_client(
|
||||||
verbose=verbose, version=api_version, context=context, environment=environment
|
verbose=verbose, version=api_version, context=context, environment=environment
|
||||||
|
@ -367,27 +367,6 @@ def find_candidates_in_parent_dirs(filenames, path):
|
|||||||
return (candidates, path)
|
return (candidates, path)
|
||||||
|
|
||||||
|
|
||||||
def check_swarm_only_config(service_dicts):
|
|
||||||
warning_template = (
|
|
||||||
"Some services ({services}) use the '{key}' key, which will be ignored. "
|
|
||||||
"Compose does not support '{key}' configuration - use "
|
|
||||||
"`docker stack deploy` to deploy to a swarm."
|
|
||||||
)
|
|
||||||
|
|
||||||
def check_swarm_only_key(service_dicts, key):
|
|
||||||
services = [s for s in service_dicts if s.get(key)]
|
|
||||||
if services:
|
|
||||||
log.warning(
|
|
||||||
warning_template.format(
|
|
||||||
services=", ".join(sorted(s['name'] for s in services)),
|
|
||||||
key=key
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
check_swarm_only_key(service_dicts, 'deploy')
|
|
||||||
check_swarm_only_key(service_dicts, 'configs')
|
|
||||||
|
|
||||||
|
|
||||||
def load(config_details, interpolate=True):
|
def load(config_details, interpolate=True):
|
||||||
"""Load the configuration from a working directory and a list of
|
"""Load the configuration from a working directory and a list of
|
||||||
configuration files. Files are loaded in order, and merged on top
|
configuration files. Files are loaded in order, and merged on top
|
||||||
@ -424,8 +403,6 @@ def load(config_details, interpolate=True):
|
|||||||
for service_dict in service_dicts:
|
for service_dict in service_dicts:
|
||||||
match_named_volumes(service_dict, volumes)
|
match_named_volumes(service_dict, volumes)
|
||||||
|
|
||||||
check_swarm_only_config(service_dicts)
|
|
||||||
|
|
||||||
version = main_file.version
|
version = main_file.version
|
||||||
|
|
||||||
return Config(version, service_dicts, volumes, networks, secrets, configs)
|
return Config(version, service_dicts, volumes, networks, secrets, configs)
|
||||||
|
@ -4,11 +4,10 @@ certifi==2020.6.20
|
|||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
colorama==0.4.3; sys_platform == 'win32'
|
colorama==0.4.3; sys_platform == 'win32'
|
||||||
distro==1.5.0
|
distro==1.5.0
|
||||||
|
docker==4.3.1
|
||||||
docker-pycreds==0.4.0
|
docker-pycreds==0.4.0
|
||||||
dockerpty==0.4.1
|
dockerpty==0.4.1
|
||||||
docopt==0.6.2
|
docopt==0.6.2
|
||||||
# temporary fix for the mem_limit float parsing
|
|
||||||
git+git://github.com/docker/docker-py@2c522fb362247a692c0493f0b47a33988eb2f3e3#egg=docker
|
|
||||||
idna==2.10
|
idna==2.10
|
||||||
ipaddress==1.0.23
|
ipaddress==1.0.23
|
||||||
jsonschema==3.2.0
|
jsonschema==3.2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user