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 quay.io/prometheus/golang-builder:1.13-base AS builder ADD . /go/src/github.com/soundcloud/ipmi_exporter/ RUN cd /go/src/github.com/soundcloud/ipmi_exporter && 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/github.com/soundcloud/ipmi_exporter/ipmi_exporter /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 https://github.com/soundcloud/ipmi_exporter/blob/master/Dockerfile

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

Source: Docker Questions

LEAVE A COMMENT