在Docker中运行OpenSearch Dashboards时,如何删除登录页面



我正在本地docker容器中运行一个OpenSearch实例。我在旁边添加了一个OpenSearch Dashboards容器,但当我访问时会有一个登录屏幕http://localhost:5601在我的浏览器中。如何禁用登录页面?这只是为了地方发展。

我的docker-compose.yml:

opensearch:
image: opensearchproject/opensearch
container_name: opensearch-local
ports:
- "9200:9200"
environment:
discovery.type: single-node
plugins.security.disabled: true
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards
container_name: opensearch-dashboards
ports:
- 5601:5601
expose:
- "5601"
environment:
OPENSEARCH_HOSTS: '["http://opensearch-local:9200"]'
depends_on:
- opensearch

有一个环境变量DISABLE_SECURITY_DASHBOARDS_PLUGIN,您可以设置为禁用OpenSearch Dashboards容器上的安全性。我将docker-compose.ymlopensearch-dashboard服务的environment配置更改为:

environment:
OPENSEARCH_HOSTS: '["http://opensearch-local:9200"]'
DISABLE_SECURITY_DASHBOARDS_PLUGIN: true

在此处找到答案:https://github.com/opensearch-project/OpenSearch-Dashboards/issues/942#issuecomment-1081187658和https://github.com/opensearch-project/OpenSearch/issues/1598#issuecomment-978189603

最新更新