安装&启动ES
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.9.3
docker run -d --name es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.9.3
image.png
设置跨域
docker exec -it es /bin/bash
vi elasticsearch.yml
docker restart es
浏览器访问
http://localhost:9200/
image.png
网友评论