scan-and-scroll doesn't work from Docker with a ElasticSearch cluster placed outside

Currently I use Docker with an ElasticSearch cluster, which is placed outside the container.
From my docker I manage to create a mapping (so my ip it’s good), and I manage to launch simple request in python language.

def getBodyOfRoot(self, id):
        res = self.es.get(index=self.ES_Index, doc_type=self.ES_Type, id=id)
        return res['_source']

this example works well in my host AND in Docker.

  • Hyperledger on mac using Docker images cannot find Docker daemon?
  • Docker Compose : NodeJS + MongoDB
  • RabbitMQ inside docker won't end gracefully and cannot reconnect
  • “rsync” was not detected as installed in your guest machine
  • Docker Check if DB is Running
  • Docker with mongo user
  • But when I launch my scan-and-scroll from Docker, I don’t get a response, but from my native OS, I get a response.

    If you have already met this problem, how did you manage to solve it ?

    Thanks in advance.

  • Running Cloudant as docker container with docker compose
  • How many CPUs does a docker container use?
  • How to give a docker image some arguments in the Dockerfile?
  • Identity Server 4 running within docker container Exception: Unable to load DLL 'System.Security.Cryptography.Native.OpenSsl'
  • Audit log for Docker
  • wrapping DB in docker image
  • One Solution collect form web for “scan-and-scroll doesn't work from Docker with a ElasticSearch cluster placed outside”

    Try to issue the scan and scroll from your Docker container using cURL:

    curl -XGET http://elastic-search-host:9200/my_index/_search?scroll=1m&search_type=scan&size=10 -d '
    {
        "query": {
            "match" : {
                "title" : "elasticsearch"
            }
        }
    }
    '
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.