Skip to content

Commit

Permalink
Merge 8a6a928 into 852ec5d
Browse files Browse the repository at this point in the history
  • Loading branch information
russss committed Nov 6, 2019
2 parents 852ec5d + 8a6a928 commit 62e019f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
*
!bin/
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
FROM debian:7.11-slim
FROM golang:1.13-buster AS base
RUN useradd -u 20001 postgres_exporter

WORKDIR /go/src/app

COPY . .
RUN go run ./mage.go binary

FROM scratch

COPY --from=0 /etc/passwd /etc/passwd
COPY --from=base /etc/passwd /etc/passwd
USER postgres_exporter

ARG binary

COPY $binary /postgres_exporter
COPY --from=base /go/src/app/postgres_exporter /postgres_exporter

EXPOSE 9187

Expand Down

0 comments on commit 62e019f

Please sign in to comment.