我是 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/