group id not set in docker-custom/Dockerfile.custom (v1.1.3)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- docker
- Domain
- devops
Research direction
Start with docker-custom/Dockerfile.custom and compare the node-red user and group setup with the reported docker run command. Verify that the image assigns node-red to its own group and that the mounted /home/user/.node-red files no longer receive root-group permissions.
Written by the indexing model from the issue text.
Description
Hi, in docker-custom/Dockerfile.custom no group id is created or assigned to the user node-red. It defaults to the root group. This creates permission problems when running something like,
docker run --rm --user=$UID -it -p 1880:1880 -v /home/user/.node-red:/data --name mynodered nodered/node-red
as the permissions in the host directory /home/user/.node-red, become mangled.
Adding something like the following seems to address it,
: xps 0 %; git diff
diff --git a/docker-custom/Dockerfile.custom b/docker-custom/Dockerfile.custom
index 018648e..c084498 100644
--- a/docker-custom/Dockerfile.custom
+++ b/docker-custom/Dockerfile.custom
@@ -21,11 +21,10 @@ RUN set -ex && \
openssh-client && \
mkdir -p /usr/src/node-red /data && \
deluser --remove-home node && \
- adduser -h /usr/src/node-red -D -H node-red -u 1000 && \
- chown -R node-red:root /data && chmod -R g+rwX /data && \
- chown -R node-red:root /usr/src/node-red && chmod -R g+rwX /usr/src/node-red
- # chown -R node-red:node-red /data && \
- # chown -R node-red:node-red /usr/src/node-red
+ addgroup --gid 1001 node-red && \
+ adduser -h /usr/src/node-red -D -H node-red -u 1001 -G node-red && \
+ chown -R node-red:node-red /data && \
+ chown -R node-red:node-red /usr/src/node-red
# Set work directory
WORKDIR /usr/src/node-red
- Dominant language
- Shell
- Stars
- 540
- Forks
- 434
- Avg merge
- 24m
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from node-red/node-red-docker
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
node-red/node-red-docker#536 ·
-
node-red/node-red-docker#522 · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
node-red/node-red-docker#513 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
node-red/node-red-docker#510 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
node-red/node-red-docker#493 · 13 comments ·
All issues in node-red/node-red-docker
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elastic/gradle-plugins#156 ·
-
Priority/High ready-for-agent Severity/Major Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
comp/cli P3 type/docs
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NousResearch/hermes-agent#119756 · 1 comment ·
-
comp: build/pipeline type: bug version: current (v17+)
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
angular/angularfire#3766 ·
-
out-of-date
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
CachyOS/CachyOS-PKGBUILDS#1903 ·