【发布时间】:2018-05-23 04:28:18
【问题描述】:
我正在尝试为 elasticsearch 1.7 运行 docker 容器。下面是我的 Dockerfile:
FROM ubuntu:16.04
RUN apt-get update \
&& apt-get install -y curl zip unzip vim software-properties-common \
&& echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections \
&& add-apt-repository -y ppa:webupd8team/java \
&& apt-get update \
&& apt-get install -y oracle-java8-installer \
&& wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | apt-key add - \
&& echo "deb http://packages.elastic.co/elasticsearch/1.7/debian stable main" | tee -a /etc/apt/sources.list.d/elasticsearch-1.7.list \
&& apt-get update \
&& apt-get install -y elasticsearch \
&& echo "network.host: localhost" >> /etc/elasticsearch/elasticsearch.yml
EXPOSE 9200
CMD ["elasticsearch"]
Docker 构建工作正常。但是 docker run 命令给了我这个错误:来自守护进程的错误响应:oci 运行时错误:container_linux.go:265:启动容器进程导致“exec:\”elasticsearch\”:可执行在 $PATH 中找不到文件”
我使用的是 Mac 和 Docker 版本是:17.09.0-ce
【问题讨论】:
标签: docker elasticsearch dockerfile ubuntu-16.04