I tried to set up Elastic as search server for a Symfony 3 application. I installed FOSElasticBundle for that (https://github.com/FriendsOfSymfony/FOSElasticaBundle). To run ElasticSearch locally, I installed the docker image from https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html, which contains the 6.1.1 version. I found that it is incompatible with the used Elastica PHP library that FOSElasticBundle uses ("Content-Type header [application/x-www-form-urlencoded] is not supported"). So I downgraded to the latest version of 5.x (https://www.elastic.co/guide/en/elasticsearch/reference/5.4/docker.html).
ElasticHQ cannot be installed within ElasticSearch anymore. Since it just contains static HTML code I created a local Apache hosting for it and tried to connect to ElasticSearch. The dockerized version is configured to use a basic authentication and limits the connections to certain IP addresses. With the following start parameters I could finally get ElasticHQ to connect to the search server:
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" \\ -e "http.cors.allow-origin=""*""" -e "http.cors.enabled=true" -e "node.master=true" \\ docker.elastic.co/elasticsearch/elasticsearch:5.4.3
xpack.security disables the basic authentication and the following three parameters were necessary to be able to open the IP limits.