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 =, doc_type=self.ES_Type, id=id)
        return res['_source']

this example works well in my host AND in Docker.

  • Vagrant: Sync folder with boot2docker box on Windows
  • Issue with the NPM
  • Starting postgres service in docker entry script
  • Using im2rec in MXnet to create dataset with png images
  • “cp: Command not found” when recreating and extending centos6-i386 Docker base image
  • How to implement custom health checks for EC2 instances without using an ELB?
  • 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.

  • How to access Docker containers from within a Vagrant VM
  • In docker run, how to set multi-value in --ulimit
  • How to not build gradle subproject using docker plugin if docker not available?
  • How to mount same dir in containers to different path
  • Consul: SD architecture. What is the right way to access microservices from a front-end side?
  • Docker - wordpress deployed on Digital Ocean Droplet - where is the wp-content?
  • 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.