updated Dockerfile pod-status-check to add non-root user
FROM golang:1.13 AS builder
-COPY . /build
+RUN groupadd -g 999 user && \
+ useradd -r -u 999 -g user user
+COPY --chown=user:user . /build
WORKDIR /build/cmd/pod-status-check
ENV CGO_ENABLED=0
RUN go build -v
-
FROM scratch
+COPY --from=builder /etc/passwd /etc/passwd
+USER user
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /build/cmd/pod-status-check/pod-status-check /app/pod-status-check
ENTRYPOINT ["/app/pod-status-check"]
