Skip to content

Commit 9870a55

Browse files
simonswinealeks-p
authored andcommitted
Ensure data folder for compactor exists (#3455)
This apparently was missed in #2875 ``` ts=2024-07-31T14:22:52.491454333Z caller=compactor.go:646 level=error component=compactor component=compactor msg="failed to compact user blocks" tenant=anonymous err="mkdir data-compactor: permission denied" ```
1 parent 02f2ded commit 9870a55

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cmd/pyroscope/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ COPY --from=debug /etc/group /etc/group
1414
# in order for the container to run as non-root.
1515
VOLUME /data
1616
COPY --chown=pyroscope:pyroscope --from=debug /data /data
17+
VOLUME /data-compactor
18+
COPY --chown=pyroscope:pyroscope --from=debug /data /data-compactor
1719

1820
COPY cmd/pyroscope/pyroscope.yaml /etc/pyroscope/config.yaml
1921
COPY profilecli /usr/bin/profilecli

cmd/pyroscope/debug.Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ SHELL [ "/busybox/sh", "-c" ]
55
RUN addgroup -g 10001 -S pyroscope && \
66
adduser -u 10001 -S pyroscope -G pyroscope -h /data
77

8-
# Copy folder from debug container, this folder needs to have the correct UID
9-
# in order for the container to run as non-root.
8+
# This folder is created by adduser command with right owner/group
109
VOLUME /data
1110

11+
# This folder needs to be created and set to the right owner/group
12+
VOLUME /data-compactor
13+
RUN mkdir -p /data-compactor && chown pyroscope:pyroscope /data /data-compactor
14+
1215
COPY .tmp/bin/linux_amd64/dlv /usr/bin/dlv
1316
COPY cmd/pyroscope/pyroscope.yaml /etc/pyroscope/config.yaml
1417
COPY profilecli /usr/bin/profilecli

0 commit comments

Comments
 (0)