弹性搜索在docker容器上成功运行。但我无法在浏览器中访问。我正确地映射了端口。但问题出在docker容器中。在容器elasticsearch中使用localhost映射
127.0.0.1:9200 Dokcerfile 来自ubuntu:16.04 MAINTAINER Rajesh Gurram
运行apt-get update && \ apt-get install -y net-tools curl wget gnupg RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:webupd8team / java && \ apt-get update && \ echo oracle-java7-installer shared / accepted-oracle-license-v1-1 select true | / usr / bin / debconf-set-selections && \ apt-get install -y oracle-java8-installer && apt-get clean
ENV JAVA_HOME / usr / lib / jvm / java-8-oracle
运行apt-get install apt-transport-https RUN wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - && \ echo“deb https://artifacts.elastic.co/packages/6.x/apt stable main”| tee -a /etc/apt/sources.list.d/elastic-6.x.list&& \ apt update && apt install -y elasticsearch
运行第七天/#不符合:192.168.0.1/thimitar.htm:0.0.0.0/go/eetc/elastitserzh/elastitssearzh.im
EXPOSE 9200 9300
在主机上运行以下命令将解决问题 $ sysctl -w vm.max_map_count = 262144
如果要使用docker获取Elasticsearch的实例,可以阅读以下指南: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
如果ubuntu不是必要的基本图像,你也可以直接从弹性使用docker图像: https://www.docker.elastic.co/
如果您想稍后升级到ELK堆栈,我建议使用docker卷以实现持久性。