Open Anastasios89 opened 11 months ago
AFAICT you can do the following in your own Dockerfile. It seems to work as expected.
FROM hipages/php-fpm_exporter AS build-fpm-exporter
# Non-root user
USER 101
This is an example using nonroot google distroless image:
FROM golang:1.20.4 as builder
WORKDIR /go/src/github.com/hipages/php-fpm_exporter
COPY . .
RUN go mod download
RUN make build
RUN cp php-fpm_exporter /bin/php-fpm_exporter
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=builder /bin/php-fpm_exporter /bin/php-fpm_exporter
EXPOSE 9253
ENTRYPOINT [ "/bin/php-fpm_exporter", "server" ]
Hello everyone,
some systems run with security contexts, which means that the container cannot run with root privileges.
Could you please also offer a non-root version docker image on docker hub?
Best regards.