Skip to content

Commit

Permalink
cmd/storagenode: fix permission to /etc/supervisor in base image
Browse files Browse the repository at this point in the history
This change fixes the `sed: can't create temp file '/etc/supervisor/supervisord.confXXXXXX': Permission denied` issue when editing the supervisord.conf file during runtime as a non-root user.

While editing the config file, Sed creates a temporary file, saves the result and then finally mv the original file with the temporary one. So we need to set the permission for the /etc/supervisor where the temporary file is created.

Change-Id: Ic9c147a9cf0a6ef94adf702e33054edce1828806
  • Loading branch information
profclems authored and ihaid committed Mar 16, 2022
1 parent 5a3047c commit 83294a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/storagenode/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ FROM ${DOCKER_ARCH:-amd64}/alpine:3.15
RUN apk --no-cache -U add ca-certificates supervisor
RUN mkdir -p /var/log/supervisor /app
COPY cmd/storagenode/docker-base/ /
RUN chmod a+rw /etc/supervisor/supervisord.conf /app
# set permissions to allow non-root access
RUN chmod -R a+rw /etc/supervisor /var/log/supervisor /app

0 comments on commit 83294a4

Please sign in to comment.