Node-RED container has no permission
gintasjuk opened this issue · 3 comments
When using Komponist to generate stack on remote ARM device, Node-RED container fails to start. Node-RED log shows:
admin@ubuntu:~/deploy$ docker logs komponist_nodered
7 May 14:20:46 - [error] Failed to start server:
7 May 14:20:47 - [error] Error: EACCES: permission denied, mkdir '/.node-red'
In docker-compose file, removing user: "1001" and adding: privileged: true fixes the issue, but not sure if this is a correct solution.
This is because the default node-red container has a user nodered
which is assigned the 1000
user ID and the user ID on the host is 1001
(which does not exist in the container), hence causing the problem of permissions.
Changing user ID to 1000 indeed fixes the problem. Just not sure how to fix the logic in the template so that proper ID is assigned.
@gintasjuk You can set the value of user id in the vars/comfig.yml
file, see:
https://github.com/shantanoo-desai/komponist/blob/main/vars/config.yml#L39