Hi Team,
I have setup NodeRed on AWS on my test environment.
Below are my architecture details :
- I am using ECS fargate to host the docker image.
- I have configured the persistent storage using EFS.
- Dockerfile consists this :
FROM nodered/node-red:latest - Deployment is done through Azure Devops pipeline using Terraform scripts.
I was facing some issues with permissions while implementing persistent storage on EFS, which I fixed by using following wiki article :
Though I could manage setup persistence storage, I still have some doubts :
When I ran the following command : ```
ls -nal /home/ubuntu/node-red
Expected output was :
drwxrwxr-x 3 1000 100 4096 Oct 2 12:02 .
drwxrwxr-x 3 1000 100 4096 Oct 2 09:25 ..
drwxr-xr-x 3 1000 1000 4096 Oct 2 10:23 data
But what I get is :
drwxr-xr-x 3 0 0 18 Dec 12 04:47 .
drwxr-xr-x 3 0 0 22 Dec 12 04:47 ..
drwxr-xr-x 2 0 0 6 Dec 12 04:47 data
Also : when I check root user using "id $USER"
instead of getting root user as 1000, I get -> uid=0(root) gid=0(root) groups=0(root)
So I fixed it by doing following :
I changed my aws task definition to use the user option to override the default userid to '0'. It looks like below now :
"name": "nodered-image",
"image": "${container_image}",
"user": "0:0",
"restart": "always",
"essential": true,
So can someone help me understand following things :
- Why I am getting root user as 0 instead of 1000 ?
- Is overriding using "user": "0:0" is right way to fix the issue? or is their any other better way ?
- I am using latest image to create container. Is it a right way or should I be using specific stable version instead?