docker中安装elasticsearch

docker下安装elasticsearch

  • 一、docker下安装单机版elasticsearch
  • 二、docker下安装elasticsearch集群(待定)

一、docker下安装单机版elasticsearch

[root@host20 ~]# docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.14.1

[root@host20 ~]# docker run -p 9200:9200 --name elasticsearch \
  -p 9300:9300 -e "discovery.type=single-node" \
   -v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
   -v /mydata/elasticsearch/data:/usr/share/elasticsearch/data \
   -d docker.elastic.co/elasticsearch/elasticsearch:7.14.1

执行完后将生成的容器启动即可

[root@host20 ~]# docker ps -a
CONTAINER ID        IMAGE                                                  COMMAND                  CREATED             STATUS                    PORTS                                            NAMES
bf3e234ef9e1        docker.elastic.co/elasticsearch/elasticsearch:7.14.1   "/bin/tini -- /usr..."   5 minutes ago       Up 16 seconds             0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp   peaceful_panini    
[root@host20 ~]# docker start peaceful_panini
peaceful_panini    

示例:pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的。

二、docker下安装elasticsearch集群(待定)

你可能感兴趣的:(docker,elasticsearch,安装使用,elasticsearch,docker)