bridgetownrb / node-runner

A simple way to execute Javascript in a Ruby context via Node
MIT License
32 stars 4 forks source link

node-runner /tmp permissions and Docker #6

Closed pessi-v closed 5 months ago

pessi-v commented 5 months ago

Hey, thanks for the nice gem!

I'm using node-runner to run @mozilla/readability in the backend. Right now I'm trying to deploy my Rails app with Docker, and am running into an issue when trying to run JS with NodeRunner:

Errno::EACCES (Permission denied - /tmp/node_runner20240606-306-k7aaz5js):

I've already tried changing the permissions on /tmp in my Dockerfile, but to no help:

RUN chmod -R 777 tmp

I realize it's not necessarily a node-runner specific issue, but maybe you have some insight as to what might be happening?

pessi-v commented 5 months ago

ok, I figured it out: I had to install nodejs and npm packages, and the node packages later in the Dockerfile