docker make failing, ipmi_exporter for Prometheus

  docker, prometheus

I’m trying to create a docker image of soundcloud/ipmi-exporter to run with Prometheus on Ubuntu Bionic with Docker 19.03.6, build 369ce74a3c. Docker on my OS X laptop is Docker version 20.10.2, build 2291f61. I am forced to build the (customized) image on my laptop because Bionic has a version of golang that’s older than what ipmi-exporter wants, and I’m not allowed to update the Ubuntu server.

Anyway, can someone tell me what I’m doing wrong in my Dockerfile?

# Container image FROM AS builder ADD . /go/src/ RUN cd /go/src/ && make

# Container image FROM ubuntu:18.04 WORKDIR / RUN apt-get update
&& apt-get install freeipmi-tools -y –no-install-recommends
&& rm -rf /var/lib/apt/lists/*

COPY –from=builder /go/src/ /bin/ipmi_exporter

EXPOSE 8888 ENTRYPOINT ["ipmi_exporter"]
CMD ["–config.file", "/ipmi_remote.yml"]
CMD ["–web.listen-address=":8889"" "–freeipmi.path=/etc/freeipmi" "–log.level="debug""]

When I run the image all I see is, ipmi_exporter: error: unexpected /bin/sh, try –help

I have ipmi_exporter running on the OS directly and I never configured a config.yml. What config.yml is the Dockerfile author talking about? It’s mentioned in the last line of

The image lives here: The sample/example Dockerfile refers to a config.yaml which this software does not use.

Source: Docker Questions