此方案仅用于开发、测试环境。
仓库地址:
Elasticsearch:https://hub.docker.com/_/elasticsearch
Kibana: https://hub.docker.com/_/kibana
安装 Elasticsearch
参考:Install Elasticsearch with Docker | Elasticsearch Guide [7.16] | Elastic
拉取镜像
# Elasticsearch 7.16.2 基础镜像是 ubuntu:20.04
docker pull elasticsearch:7.16.2
# kibana:7.16.2 基础镜像是 centos:8
docker pull kibana:7.16.2
如需定制自己的 docker 镜像可参考:
dockerfiles/Dockerfile at v7.16.2 · elastic/dockerfiles (github.com)
创建 elasticsearch 数据挂载目录
export DIR_ES=${
HOME}"/dockers/elasticsearch"
mkdir -p ${DIR_ES}/data
mkdir -p ${DIR_ES}/config
mkdir -p ${DIR_ES}/plugins
cd ${DIR_ES}
sudo chown -R