【问题标题】:Installing python3 python3-pip and awscli on elasticsearch_exporter container在 elasticsearch_exporter 容器上安装 python3 python3-pip 和 awscli
【发布时间】:2020-12-28 00:50:09
【问题描述】:

我正在尝试在 elasticsearch_exporter 容器上安装以下软件包。 我尝试了 yuminstall 和 apt-get 并且无法使用它们进行安装。 谁能告诉如何在这个容器上安装软件包?

Linux elasticsearch-exporter-6dbd9cf659-7km8x 5.2.9-1.el7.elrepo.x86_64 #1 SMP Fri Aug 16 08:17:55 EDT 2019 x86_64 GNU/Linux

错误: apt-get 安装 python3 sh: apt-get: 未找到

python3 python3-pip awscli

【问题讨论】:

    标签: linux amazon-web-services docker kubernetes containers


    【解决方案1】:

    如果您指的是justwatch/elasticsearch_exporter 图像,那么它是基于busybox 图像(source)。里面没有包管理器,添加一个会比较困难。

    解决此问题的一种简单方法是将导出器复制到常规 Debian 映像中,如下所示:

    FROM justwatch/elasticsearch_exporter:1.1.0 as source
    
    FROM debian:buster-slim
    COPY --from=source /bin/elasticsearch_exporter /bin/elasticsearch_exporter
    
    EXPOSE      9114
    ENTRYPOINT  [ "/bin/elasticsearch_exporter" ]
    

    这是你的出口商,里面有apt

    【讨论】:

      猜你喜欢
      • 2013-06-30
      • 2020-09-30
      • 2022-01-25
      • 2022-01-14
      • 2017-08-23
      • 2014-08-22
      • 2020-02-20
      • 2014-01-23
      • 1970-01-01
      相关资源
      最近更新 更多