diff --git a/cmd/pyroscope/Dockerfile b/cmd/pyroscope/Dockerfile index 811dd4de69..edf7d0b8ff 100644 --- a/cmd/pyroscope/Dockerfile +++ b/cmd/pyroscope/Dockerfile @@ -14,6 +14,8 @@ COPY --from=debug /etc/group /etc/group # in order for the container to run as non-root. VOLUME /data COPY --chown=pyroscope:pyroscope --from=debug /data /data +VOLUME /data-compactor +COPY --chown=pyroscope:pyroscope --from=debug /data /data-compactor COPY cmd/pyroscope/pyroscope.yaml /etc/pyroscope/config.yaml COPY profilecli /usr/bin/profilecli diff --git a/cmd/pyroscope/debug.Dockerfile b/cmd/pyroscope/debug.Dockerfile index 7569517e33..e3be6ef60d 100644 --- a/cmd/pyroscope/debug.Dockerfile +++ b/cmd/pyroscope/debug.Dockerfile @@ -5,10 +5,13 @@ SHELL [ "/busybox/sh", "-c" ] RUN addgroup -g 10001 -S pyroscope && \ adduser -u 10001 -S pyroscope -G pyroscope -h /data -# Copy folder from debug container, this folder needs to have the correct UID -# in order for the container to run as non-root. +# This folder is created by adduser command with right owner/group VOLUME /data +# This folder needs to be created and set to the right owner/group +VOLUME /data-compactor +RUN mkdir -p /data-compactor && chown pyroscope:pyroscope /data /data-compactor + COPY .tmp/bin/linux_amd64/dlv /usr/bin/dlv COPY cmd/pyroscope/pyroscope.yaml /etc/pyroscope/config.yaml COPY profilecli /usr/bin/profilecli