windows - Windows 中的 ElasticSearch docker image vm max map count

标签 windows docker elasticsearch docker-compose

我是 Docker 和 Elasticsearch 的新手。 我正在使用 Windows 7 机器。我正在使用 docker-compose up 来启动 docker 容器。我的 yml 文件有

elasticsearch:
  image: elasticsearch:5.1.1
  environment:
    ES_JAVA_OPTS: "-Xms1g -Xmx1g"

连同其他链接图像。
我正在使用 docker 调出 elasticsearch 图像,当我这样做时出现以下错误

[36melasticsearch_1   |←[0m ERROR: bootstrap checks failed
[36melasticsearch_1   |←[0m max virtual memory areas vm.max_map_count [65530]  is too low, increase to at least [262144]
[36melasticsearch_1   |←[0m [2017-02-08T11:06:51,752][INFO ][o.e.n.Node

我在谷歌上搜索了一个解决方案以及他们建议使用的所有地方 sudo sysctl vm.max_map_count=262144,但在 Windows 中 sysctl 不可用。没有为 Windows 提供明确的步骤。

其他一些 Docker 镜像已在我的机器上启动并运行,因此 Docker 可以正常工作。

有人可以提供任何线索来解决这个问题吗?

最佳答案

几个月来我一直被这个问题困扰,解决方案是在 cmd.exe 上启动以下命令(如果 cmd 不起作用,请尝试 Powershell 或 Bash),as stated in the official Elasticsearch documentation :

1) wsl -d docker-desktop
2) sysctl -w vm.max_map_count=262144

您已准备好启动 Elasticsearch!

关于windows - Windows 中的 ElasticSearch docker image vm max map count,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42111566/

相关文章:

c++ - Windows 32 API : 2 Checkboxes acting as one?

mongodb - 如何将docker run命令行arg传递给docker-compose?

linux - 存储库 'http://archive.debian.org/debian jessie Release' 未签名

elasticsearch - 如何使用ElasticSearch获得不完全匹配的结果?

elasticsearch - 如何使用 Elasticsearch 数据源在Grafana中显示带小数位的值?

c++ - DeviceIoControl 调用崩溃

windows - GUI 元素随 MS Outlook 11.0 对象库 + Outlook 2016 Ver 1702 移动

windows - Elasticsearch 安装问题 : System has not been booted with systemd as init system (PID 1). 无法运行

docker - Nuget 命令在 docker 文件中失败,但在手动运行时失败

elasticsearch - 短语建议器 Elasticsearch 不纠正两个词