Skip to content
This repository was archived by the owner on Sep 5, 2019. It is now read-only.

Commit ee4a22d

Browse files
committed
run as non privileged user
1 parent 4d65ce9 commit ee4a22d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ RUN go get github.com/sirupsen/logrus && go run mage.go binary
88

99
FROM debian:stable-slim
1010

11+
RUN apt-get update && apt-get dist-upgrade -y && apt-get install curl -y && apt-get clean all
12+
RUN useradd -ms /bin/bash monitoring
13+
1114
COPY --from=0 /go/src/github.com/wrouesnel/postgres_exporter/postgres_exporter /usr/bin
1215

1316
EXPOSE 9187
1417

18+
USER monitoring
19+
1520
CMD [ "/usr/bin/postgres_exporter" ]

0 commit comments

Comments
 (0)