弹性搜索在 docker 容器上成功运行。但我无法在浏览器中访问。我正确映射了端口。但问题出在 docker 容器中。在容器中弹性搜索与 localhost 映射
127.0.0.1:9200
Dokcerfile
来自 ubuntu:16.04 维护者 Rajesh Gurram
运行 apt-get update && \ apt-get install -y net-tools curl wget gnupg 运行 apt-get install -y software-properties-common
运行 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 运行 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
运行 sed -i 's/#network.host: 192.168.0.1/network.host: 0.0.0.0/g' /etc/elasticsearch/elasticsearch.yml
暴露 9200 9300