安装ik分词器
下载ik分词器
下载地址:https://github.com/infinilabs/analysis-ik/releases
Dockerfile
bash
FROM docker.elastic.co/elasticsearch/elasticsearch:8.12.2
COPY ./elasticsearch-analysis-ik-8.12.2.zip /opt/
RUN bin/elasticsearch-plugin install --batch file:/opt/elasticsearch-analysis-ik-8.12.2.zip
RUN rm -rf /opt/elasticsearch-analysis-ik-8.12.2.zip
build镜像
bash
docker build -t elasticsearch-with-ik:8.12.2 .