postgres_exporter/Dockerfile
Janis Orlovs 06781103f0 Docker file added multistage build to add non-root user running under ID:20001 for image.
Reduces attack surface by not running image as root user
2019-07-03 22:17:37 +10:00

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