我已经运行了用于elasticsearch和kibana的停靠容器,一旦启动停靠容器,它就会自动安装一些插件。
我需要编辑config/ as ticsearch.yml文件以启用该插件的使用,我正在尝试找到类似于通过如下所示的文件安装插件的方法
ARG ELASTIC_VERSION="$ELASTIC_VERSION"
FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
RUN bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-opennlp/releases/download/7.6.0.1/ingest-opennlp-7.6.0.1.zip
RUN bin/elasticsearch-plugin install mapper-annotated-text
RUN bin/elasticsearch-plugin install analysis-phonetic
RUN bin/elasticsearch-plugin install ingest-attachment --batch
RUN bin/ingest-opennlp/download-models发布于 2020-02-26 21:37:21
正确的方法是创建一个新的docker镜像:
FROM elasticsearch
COPY elasticsearch.yml config/elasticsearch.yml发布于 2020-03-02 12:21:13
解决了,所以感谢所有的帮助
灵感来自https://stackoverflow.com/a/49755244/12851178
已更新elasticsearch文件;请将此文件保存在此处以供其他人将来参考
ARG ELASTIC_VERSION="$ELASTIC_VERSION"
FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
RUN bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-opennlp/releases/download/7.6.0.1/ingest-opennlp-7.6.0.1.zip
RUN bin/elasticsearch-plugin install mapper-annotated-text
RUN bin/elasticsearch-plugin install analysis-phonetic
RUN bin/elasticsearch-plugin install ingest-attachment --batch
RUN bin/ingest-opennlp/download-models
RUN echo "ingest.opennlp.model.file.persons: en-ner-persons.bin" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN echo "ingest.opennlp.model.file.dates: en-ner-dates.bin" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN echo "ingest.opennlp.model.file.locations: en-ner-locations.bin" >> /usr/share/elasticsearch/config/elasticsearch.ymlhttps://stackoverflow.com/questions/60406102
复制相似问题