mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2024-12-13 02:15:34 +00:00
06781103f0
Reduces attack surface by not running image as root user
16 lines
232 B
Docker
16 lines
232 B
Docker
FROM debian:7.11-slim
|
|
RUN useradd -u 20001 postgres_exporter
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=0 /etc/passwd /etc/passwd
|
|
USER postgres_exporter
|
|
|
|
ARG binary
|
|
|
|
COPY $binary /postgres_exporter
|
|
|
|
EXPOSE 9187
|
|
|
|
ENTRYPOINT [ "/postgres_exporter" ]
|