环境:centos7虚拟机、docker、elasticsearch7.8.0镜像
1、docker拉取elasticsearch7.8.0镜像
docker search elasticsearch
docker pull elasticsearch:7.8.0
2、创建网络network
Create user defined network (useful for connecting to other services attached to the same network (e.g. Kibana))
docker network create esnetwork
3、启动elasticsearch容器
docker run -d --name elasticsearch --net esnetwork -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.8.0
4、测试
访问 http://虚拟机ip:9200/
image.png
网友评论