Skip to content

Commit

Permalink
Ensure data folder for compactor exists (#3455)
Browse files Browse the repository at this point in the history
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"
```
  • Loading branch information
simonswine authored and aleks-p committed Jul 31, 2024
1 parent 02f2ded commit 9870a55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cmd/pyroscope/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions cmd/pyroscope/debug.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9870a55

Please sign in to comment.