Dockerfile:无法运行bin命令ubuntu
试图安装elasticsearch并在我的dockerfile中遇到错误。似乎无法运行bin。
#JDK 1.8 on Ubuntu for ElasticSearchRUN 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。
回答:
像这样安装密钥似乎存在问题。这里和这里都有类似的问题。
建议的解决方案是像这样拆分命令:
wget -q https://artifacts.elastic.co/GPG-KEY-elasticsearchapt-key add GPG-KEY-elasticsearch
就您而言,我怀疑wget
命令的输出不是GPG
关键。可能是其他原因(例如代理响应)或错误。尝试删除静默标志(-q
),以了解实际情况。
希望能有所帮助。
以上是 Dockerfile:无法运行bin命令ubuntu 的全部内容, 来源链接: utcz.com/qa/414396.html