Search code examples
elasticsearchdockerelasticsearch-plugin

docker: how-to install elasticsearch delete-by-query


On a server with no internet connectivity, usually am installing packages using a proxy (tiny proxy on port 8888) by just doing export

How can i possibly install the delete-by-query plugin inside a docker container ?

If i do --publish 8888:8888 and export port 8888 in both host+container, i do not succeed on having internet connectivity inside the container (on host i can establish internet connectivity)

Can you please advise on how-to circumvent this ? am using the official elasticsearch docker image.

/usr/share/elasticsearch/bin/plugin install delete-by-query

Solution

  • You can set environments (ENV) in Dockerfiles

    ENV http_proxy tiny_proxy:8888
    ENV https_proxy tiny_proxy:8888
    

    So when build the image, the build process will download plugin or other patches (such as yum update) from Internet via proxy servers you defined in Dockerfile