CRIT messages in log after update (docker)

Hello,

If doesn’t specify user I receive CRIT message:

CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.

If specify user id I receive this CRIT message:

CRIT could not write pidfile /run/supervisord.pid

Looks like better when I doesn’t specify user and container uses root user in config but this contradicts best practices.

did you use the new uid gid in the docker run command…
you can just remove those… they are on the default, but most of us haven’t configured our setups to run with it, yet and if its not configured correctly it will keep the storagenode from running correctly.

docker run --rm -e SETUP="true" \
    --user $(id -u):$(id -g) \  
    --mount type=bind,source="<identity-dir>",destination=/app/identity \
    --mount type=bind,source="<storage-dir>",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

just get rid of the user part i think most likely solves it
--user $(id -u):$(id -g) \

woop grabbed the wrong command…

docker run -d --restart unless-stopped --stop-timeout 300 \
    -p 28967:28967/tcp \
    -p 28967:28967/udp \
    -p 127.0.0.1:14002:14002 \
    -e WALLET="0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
    -e EMAIL="user@example.com" \
    -e ADDRESS="domain.ddns.net:28967" \
    -e STORAGE="2TB" \
    --user $(id -u):$(id -g) \
    --mount type=bind,source="<identity-dir>",destination=/app/identity \
    --mount type=bind,source="<storage-dir>",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

same deal tho…
most likely you will need to use the user id which the storagenode was created for… or just leave that part of the command out entirely.

i never used the user $(id… part yet

i got the commands from here.

Sorry for long reply,

I mean when I added to docker command --user 1000:1000 and changed permissions for the folder. I saw another CRIT message

CRIT could not write pidfile /run/supervisord.pid

So, what changes me need to do resolve new CRIT message?