0

I'm trying to run Docker container from Python using Docker SDK and its always fail with the following error: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] Form searching on the web I found that I need to change the discovery type to single-node, how can I add it?

import docker
client = docker.from_env()
port = {'9200/tcp':'9200','9300/tcp':'9300'}
container = client.containers.run("docker.elastic.co/elasticsearch/elasticsearch:7.10.1",ports=port)
  • Does this answer your question? [ElasticSearch start up error - the default discovery settings are unsuitable for production use;](https://stackoverflow.com/questions/59350069/elasticsearch-start-up-error-the-default-discovery-settings-are-unsuitable-for) – AzyCrw4282 Dec 31 '20 at 08:28

1 Answers1

0

I solved that by adding the environment flag to run function call as

Environment = { " discovery.type"="single-node"}