cmd/storagenode: move supervisord config file to storagenode-base image

The supervisord.conf file is edited to set the args for the storagenode and storagenode-updater binaries at runtime. This change moves the config file to the base image so we can set the permission to allow non-root users edit the config file.

Non-root user permission is also needed for the /app directory so we can install/update the binaries when run as a non-root user.

Updates https://github.com/storj/storj/issues/4489

Change-Id: If7a51a00ea171253e41923501174a43393f4638c
This commit is contained in:
Clement Sam 2022-03-08 13:30:04 +00:00
parent 26b722e414
commit 053a38a46d
3 changed files with 3 additions and 2 deletions

View File

@ -2,4 +2,6 @@ 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
RUN mkdir -p /var/log/supervisor /app
COPY cmd/storagenode/docker-base/ /
RUN chmod a+rw /etc/supervisor/supervisord.conf /app

View File

@ -1,5 +1,4 @@
[supervisord]
user=root
nodaemon=true
logfile=/var/log/supervisor/supervisord.log
pidfile=/run/supervisord.pid