简体   繁体   中英

Error when building the blackbox_exporter Docker image

I am just getting started with Prometheus and I may be doing something wrong, but I am getting the following error when trying to build the blackbox_exporter ( https://github.com/prometheus/blackbox_exporter ) image with:

docker build -t blackbox_exporter . 

Error being:

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

When I edit the Dockerfile and update it to:

COPY . /bin/blackbox_exporter

Then it builds properly. Any ideas?

Thanks in advance.

David

Looking at the Makefile for that project , the docker image build happens after the application is built by promu. The container is designed to be a minimal environment of busybox and the application binary that you first create outside of docker.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM