mirror of https://github.com/docker/compose.git
Do not print Swarm mode warning when connecting to a UCP server
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
3147090fb4
commit
ea68be3441
|
@ -538,6 +538,10 @@ def get_volumes_from(project, service_dict):
|
||||||
def warn_for_swarm_mode(client):
|
def warn_for_swarm_mode(client):
|
||||||
info = client.info()
|
info = client.info()
|
||||||
if info.get('Swarm', {}).get('LocalNodeState') == 'active':
|
if info.get('Swarm', {}).get('LocalNodeState') == 'active':
|
||||||
|
if info.get('ServerVersion', '').startswith('ucp'):
|
||||||
|
# UCP does multi-node scheduling with traditional Compose files.
|
||||||
|
return
|
||||||
|
|
||||||
log.warn(
|
log.warn(
|
||||||
"The Docker Engine you're using is running in swarm mode.\n\n"
|
"The Docker Engine you're using is running in swarm mode.\n\n"
|
||||||
"Compose does not use swarm mode to deploy services to multiple nodes in a swarm. "
|
"Compose does not use swarm mode to deploy services to multiple nodes in a swarm. "
|
||||||
|
|
Loading…
Reference in New Issue