Skip to content

Commit e52349f

Browse files
authored
Move to non-root container
1 parent 1863447 commit e52349f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ COPY collector ./collector
99
COPY client ./client
1010
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -installsuffix cgo -ldflags "-X main.version=${VERSION} -X main.gitCommit=${GIT_COMMIT}" -o exporter .
1111

12-
FROM alpine:3.11
12+
FROM gcr.io/distroless/static:latest
1313
COPY --from=builder /go/src/github.com/nginxinc/nginx-prometheus-exporter/exporter /usr/bin/
14+
15+
USER 1001:1001
16+
1417
ENTRYPOINT [ "/usr/bin/exporter" ]

0 commit comments

Comments
 (0)