我试图在elasticsearch_exporter容器上安装以下软件包。我试过yuminstall和apt,但无法使用它们进行安装。有人能告诉我如何在这个容器上安装软件包吗?
Linux elasticsearch-出口商-6 dbd9cf659-7 km8x5.2.9-1.el7.elrepo.x86_64 #1 SMP星期五8月16日08:17:55 x86_64 2019年x86_64 GNU/Linux
错误:apt安装python3 sh: apt: not
python3 python3 3-pip awscli
发布于 2020-09-09 19:54:32
如果您指的是justwatch/elasticsearch_exporter图像,那么它是基于busybox图像(来源)的。里面没有包管理器,添加一个包管理器是相当困难的。
解决这一问题的一个简单方法是将出口商复制到常规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。
https://stackoverflow.com/questions/63814157
复制相似问题