Missing user node
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Inspect the image's Dockerfile or build entry point and compare its user setup with the referenced official Node.js Dockerfile. Add the non-root node user support requested, then verify the built container can run as that user and that the existing startup command still works.
Written by the indexing model from the issue text.
Description
I usually deploy Node.js docker container with user node to avoid deploying with root user. It seems like node-caged does not have node user and default user is root which is not safe in production deployment.
# # ###### final image ######
FROM node:24-slim
........
WORKDIR /app
COPY --chown=node --from=builder /app/ /app/
......
USER node
EXPOSE 4000
CMD ["./start.sh"]
For reference here is official node dockerfile:
https://github.com/nodejs/docker-node/blob/main/Dockerfile-slim.template#L3-L4
It is also recommened by docker-node Best Practices:
https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#non-root-user
- Dominant language
- Shell
- Stars
- 123
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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 platformatic/node-caged
-
Add a LICENSE file Open
Difficulty 1/5 Under an hour Newbie friendliness 68/100
platformatic/node-caged#12 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
platformatic/node-caged#8 · 1 comment · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
platformatic/node-caged#5 · 1 comment ·
All issues in platformatic/node-caged
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
astral-sh/python-build-standalone#1293 ·
-
package-update
Difficulty 1/5 Under an hour Newbie friendliness 90/100
oSoWoSo/vOid_Community_repOsitory#185 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
carbon-language/carbon-lang#7821 ·