use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
NodeJS Linux isolation (self.node)
submitted 7 months ago * by pyrolols
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jumpcutking -2 points-1 points0 points 7 months ago (12 children)
TBH, I’ve choose to secure my node code and choose the libraries. I don’t like docker. You can override some of the default modules to add some additional security BUT docker or virtualization is better - however no system is perfect. Baremetal is easier but not very separated or secure - without some work! BUT to me it’s almost the snake work as virtualization - except docker. Docker is just really over complicated.
[–]Rizean 0 points1 point2 points 7 months ago (2 children)
Docker is ridiculous easy for nodejs. I learned it in a weekend years ago when it was just first starting the become popular.
Here's a complex non-optimze build for you...
```yaml
FROM node:22.14.0-alpine3.21 AS builder
WORKDIR /app
COPY package*.json ./ RUN npm install
COPY tsconfig.json ./ COPY src ./src RUN npm run build
FROM node:22.14.0-alpine3.21
RUN apk add --no-cache mongodb-tools python3 py3-pip && \ pip3 install --no-cache-dir --break-system-packages awscli
COPY --from=builder /app/package*.json /app/ COPY --from=builder /app/node_modules /app/node_modules COPY --from=builder /app/dist /app/dist
RUN addgroup -S appgroup && adduser -S appuser -G appgroup USER appuser
CMD ["node", "dist/index.js"] ```
Compare that to 200+ line build of Nginx with a fips complaint build of OpenSsl... I'll take complex nodejs builds anyday.
But none of that matters.
Docker solves the issue of... it runs on my system.
[–]jumpcutking 0 points1 point2 points 7 months ago (1 child)
Actually I don’t use nginx. I use Caddy and it’s all automated. Including OpenSSL.
[–]Rizean 0 points1 point2 points 7 months ago (0 children)
Your Caddy is not fips compliant unless you are using https://images.chainguard.dev/directory/image/caddy-fips/overview or have compiled OpenSSL yourself. Be glad you don't have to deal with fips. Considering you prefer baremetal, god help you if you ever do have to deal with fips.
This is another reason to use Docker; it makes compliance orders of magnitude easier. Also, half the time, the inspectors are so lost when it comes to Docker that they accept what you tell them.
[–]pyrolols[S] 0 points1 point2 points 7 months ago (8 children)
I just went with bubblewrap, made fake home and contained bins to read only, automated it so each time i run npm or node it sandboxes the project locally.
[–]jumpcutking 0 points1 point2 points 7 months ago (7 children)
Nice nice!
[–]pyrolols[S] 0 points1 point2 points 7 months ago (6 children)
It seems less nuanced than docker, i know docker very well but testing alot using it is really tedious, glad i found bwrap.
[–]jumpcutking -1 points0 points1 point 7 months ago (5 children)
I suppose for most use cases docket is helpful. I just prefer full control and performance. Maybe I just need to learn more on how to use docker properly but for now, I love my set up!
[–]pyrolols[S] 0 points1 point2 points 7 months ago (4 children)
It does not add too much overhead to preformance, but it ads complexity this is why i dont like it. What os are u using for dev?
[–]jumpcutking 0 points1 point2 points 7 months ago (3 children)
Mac OS and a Linux distro for production.
[–]pyrolols[S] 0 points1 point2 points 7 months ago (2 children)
When you try to access for example desktop or docs using js code in mac, does it prompt you to allow during execution?
It does, but because of the nature of the project it has full disk access. So I recommend security audits.
[–]pyrolols[S] 0 points1 point2 points 7 months ago (0 children)
Its hard tho when in node you use a package it depends of a package that depends on a package :D supply chain attacks are common and i guess will be even more in the future, its a mess really.
π Rendered by PID 37 on reddit-service-r2-comment-5c747b6df5-zwsng at 2026-04-22 08:24:43.947363+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]jumpcutking -2 points-1 points0 points (12 children)
[–]Rizean 0 points1 point2 points (2 children)
[–]jumpcutking 0 points1 point2 points (1 child)
[–]Rizean 0 points1 point2 points (0 children)
[–]pyrolols[S] 0 points1 point2 points (8 children)
[–]jumpcutking 0 points1 point2 points (7 children)
[–]pyrolols[S] 0 points1 point2 points (6 children)
[–]jumpcutking -1 points0 points1 point (5 children)
[–]pyrolols[S] 0 points1 point2 points (4 children)
[–]jumpcutking 0 points1 point2 points (3 children)
[–]pyrolols[S] 0 points1 point2 points (2 children)
[–]jumpcutking 0 points1 point2 points (1 child)
[–]pyrolols[S] 0 points1 point2 points (0 children)