我想在我的 docker 容器上安装 ES(6.1.1),但引用了很多 Material ,我只看到默认情况下我能够下载最新版本 6.2.4,但我不想要这个版本,因为我有某些软件包在我的代码中,它不适用于最新版本。
下载ES链接 https://www.elastic.co/downloads/past-releases/elasticsearch-6-1-1
Docker 文件片段
RUN apt-get update && apt-get -y install apt-transport-https curl
RUN echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list
RUN apt-get update && sudo apt-get install elasticsearch
正如你在这里看到的,它写的是 6.x,即使我通过复制下载链接将其更改为(ES 版本 6.1.1),我也会收到一些 buid 错误 404。
如有任何帮助,我们将不胜感激?
最佳答案
好的,这对我来说适用于 Ubuntu 的基本镜像。您需要为弹性存储库添加 GPG key ,然后从中进行安装。完成后,您可以像我一样在最终的 apt-get 中指定版本。
RUN apt-get update && apt-get -y install apt-transport-https curl wget
RUN wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
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 && apt-get install elasticsearch=6.1.1
关于docker - 在docker上安装特定版本的elasticsearch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50006198/