简体   繁体   English

带Docker的ElasticSearch - 启用匿名访问

[英]ElasticSearch with Docker - Enable Anonymous Access

For local development, I want to run an ElasticSearch (5.5.2) container using Docker, but I don't want to have to deal with authentication. 对于本地开发,我想使用Docker运行ElasticSearch(5.5.2)容器,但我不想处理身份验证。

I have read https://www.elastic.co/guide/en/x-pack/5.5/anonymous-access.html , and it seems that the container comes with X-Pack which adds security (requiring a username and password). 我已阅读https://www.elastic.co/guide/en/x-pack/5.5/anonymous-access.html ,似乎容器附带X-Pack,增加了安全性(需要用户名和密码) 。

Previously I have been running: 以前我一直在运行:

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --name es docker.elastic.co/elasticsearch/elasticsearch:5.5.

How can I allow anonymous access? 如何允许匿名访问?

Add the environmental variable xpack.security.enabled=false to the docker run command. 将环境变量xpack.security.enabled=false添加到xpack.security.enabled=false docker run命令。

Complete command: 完成命令:

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" --name es docker.elastic.co/elasticsearch/elasticsearch:5.5.2

Reference: https://discuss.elastic.co/t/how-do-i-disable-x-pack-security-on-the-elasticsearch-5-2-2-docker-image/78183/4 参考: https//discuss.elastic.co/t/how-do-i-disable-x-pack-security-on-the-elasticsearch-5-2-2-docker-image/78183/4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM