storj/cmd/storagenode/Dockerfile.base
Clement Sam 155c070837 cmd/storagenode: fix permission to /etc/supervisor in base image
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
2022-03-15 13:01:23 +00:00

9 lines
285 B
Docker

ARG DOCKER_ARCH
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/ /
# set permissions to allow non-root access
RUN chmod -R a+rw /etc/supervisor /var/log/supervisor /app