Skip to content

Commit 85a52b2

Browse files
authored
Merge pull request #4 from quintoandar/fix-dockerfile
chore: fix dockerfile
2 parents eec8680 + 2905bc0 commit 85a52b2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ FROM golang:1.19-alpine as build
33
WORKDIR ${GOPATH}/src/github.com/quintoandar
44
RUN apk update && apk add make git curl && git clone --branch main https://github.com/quintoandar/postgres_exporter.git
55
WORKDIR ${GOPATH}/src/github.com/quintoandar/postgres_exporter
6-
ENV GOARCH=amd64
76
RUN make release
87
RUN chmod +x postgres_exporter && mv postgres_exporter /tmp/postgres_exporter
98

9+
1010
FROM quay.io/prometheus/busybox:latest as final
11-
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
1211

13-
COPY --from=build ["/tmp/postgres_exporter", "/bin/postgres_exporter" ]
12+
COPY --from=build ["/tmp/postgres_exporter", "/" ]
13+
14+
WORKDIR /opt/exporter
15+
16+
EXPOSE 9187
1417

15-
EXPOSE 9187
16-
USER nobody
17-
ENTRYPOINT [ "/bin/postgres_exporter" ]
18+
ENTRYPOINT [ "/postgres_exporter" ]

0 commit comments

Comments
 (0)