diff --git a/Dockerfile b/Dockerfile index dace6dcce..7249ea195 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,13 @@ ENV GOARCH=amd64 RUN make release RUN chmod +x postgres_exporter && mv postgres_exporter /tmp/postgres_exporter + FROM quay.io/prometheus/busybox:latest as final -LABEL maintainer="The Prometheus Authors " -COPY --from=build ["/tmp/postgres_exporter", "/bin/postgres_exporter" ] +COPY --from=build ["/tmp/postgres_exporter", "/" ] + +WORKDIR /opt/exporter + +EXPOSE 9187 -EXPOSE 9187 -USER nobody -ENTRYPOINT [ "/bin/postgres_exporter" ] +ENTRYPOINT [ "/postgres_exporter" ]