【发布时间】:2019-11-08 15:15:29
【问题描述】:
尝试安装 elasticsearch 并在我的 dockerfile 中遇到错误。看起来它无法运行 bin。
#JDK 1.8 on Ubuntu for ElasticSearch
RUN add-apt-repository -y ppa:webupd8team/java
RUN apt-get -y update
RUN apt-get -y install openjdk-8-jre
RUN wget -qO – https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add –
RUN apt-get install apt-transport-https
RUN echo “deb https://artifacts.elastic.co/packages/6.x/apt stable main” | tee -a /etc/apt/sources.list.d/elastic-6.x.list
RUN apt-get update
RUN apt-get install elasticsearch
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic
RUN -service elasticsearch start
RUN gedit /etc/elasticsearch/jvm.options
RUN gedit /etc/elasticsearch/elasticsearch.yml
RUN curl -XGET ‘http://localhost:9200/_cat/health?v&pretty’
Step 21/70 : RUN wget -qO – https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add –
---> Running in 7558b8a264b8
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
The command '/bin/sh -c wget -qO – https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add –' returned a non-zero code: 2
对 docker 来说有点新,所以任何帮助都将不胜感激。我正在运行 root 用户,所以我不需要在任何这些命令前添加 sudo。
【问题讨论】:
-
请提供完整的
dockerfile -
这是一个非常大的文件@mchawre,其余部分运行正常。我将提供不起作用的部分。整个部分可能需要帮助。它卡在第 5 行 wget -q0
-
你检查过这个stackoverflow.com/questions/21338721/…尝试在wget中添加
--no-check-certificate选项。 -
我刚刚尝试过,但我得到了相同的结果。
-
apt-key add – 会在输出中打印密钥,因此被认为是不安全的。这至少解释了警告。不幸的是,没有可用的 apt-get 详细命令...
标签: docker elasticsearch bin