【问题标题】:Error when building the blackbox_exporter Docker image构建 blackbox_exporter Docker 映像时出错
【发布时间】:2016-06-24 15:41:28
【问题描述】:

我刚刚开始使用Prometheus,我可能做错了什么,但是在尝试使用以下内容构建 blackbox_exporter (https://github.com/prometheus/blackbox_exporter) 图像时出现以下错误:

docker build -t blackbox_exporter . 

错误是:

Step 3 : COPY blackbox_exporter /bin/blackbox_exporter
lstat blackbox_exporter: no such file or directory

当我编辑 Dockerfile 并将其更新为:

COPY . /bin/blackbox_exporter

然后它会正确构建。有什么想法吗?

提前致谢。

大卫

【问题讨论】:

    标签: docker monitoring prometheus


    【解决方案1】:

    查看Makefile for that project,docker 镜像构建发生在promu 构建应用程序之后。容器被设计为busybox的最小环境和您首先在docker之外创建的应用程序二进制文件。

    【讨论】:

    • 谢谢!我现在遇到 GOPATH 错误:make >> formatting code can't load package: package _/home/me/monitoring/blackbox_exporter: cannot find package "_/home/me/monitoring/blackbox_exporter" in any of: /usr/local/go/src/_/home/me/monitoring/blackbox_exporter (from $GOROOT) /home/me/monitoring/blackbox_exporter/src/_/home/me/monitoring/blackbox_exporter (from $GOPATH) make: *** [format] Error 1
    • ...实际上看起来有人遇到了这个错误:stackoverflow.com/questions/37637936/…
    猜你喜欢
    • 1970-01-01
    • 2018-04-23
    • 1970-01-01
    • 2018-01-13
    • 1970-01-01
    • 2015-12-23
    • 2021-02-14
    • 2020-10-17
    • 1970-01-01
    相关资源
    最近更新 更多