Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix dockerfile #4

Merged
merged 3 commits into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ FROM golang:1.19-alpine as build
WORKDIR ${GOPATH}/src/github.com/quintoandar
RUN apk update && apk add make git curl && git clone --branch main https://github.com/quintoandar/postgres_exporter.git
WORKDIR ${GOPATH}/src/github.com/quintoandar/postgres_exporter
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 <[email protected]>"

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" ]
Loading