github.com/grafana/pyroscope@v1.18.0/cmd/pyroscope/Dockerfile (about) 1 FROM gcr.io/distroless/static:debug@sha256:7dc183cc0aea6abd9d105135e49d37b7474a79391ebea7eb55557cd4486d2225 AS debug 2 3 SHELL [ "/busybox/sh", "-c" ] 4 5 RUN addgroup -g 10001 -S pyroscope && \ 6 adduser -u 10001 -S pyroscope -G pyroscope -h /data 7 8 FROM gcr.io/distroless/static@sha256:87bce11be0af225e4ca761c40babb06d6d559f5767fbf7dc3c47f0f1a466b92c 9 10 COPY --from=debug /etc/passwd /etc/passwd 11 COPY --from=debug /etc/group /etc/group 12 13 # Copy folder from debug container, this folder needs to have the correct UID 14 # in order for the container to run as non-root. 15 VOLUME /data 16 COPY --chown=pyroscope:pyroscope --from=debug /data /data 17 VOLUME /data-compactor 18 COPY --chown=pyroscope:pyroscope --from=debug /data /data-compactor 19 VOLUME /data-metastore 20 COPY --chown=pyroscope:pyroscope --from=debug /data /data-metastore 21 22 COPY cmd/pyroscope/pyroscope.yaml /etc/pyroscope/config.yaml 23 COPY profilecli /usr/bin/profilecli 24 COPY pyroscope /usr/bin/pyroscope 25 26 USER pyroscope 27 EXPOSE 4040 28 ENTRYPOINT [ "/usr/bin/pyroscope" ] 29 CMD ["-config.file=/etc/pyroscope/config.yaml"]