Closed cbackas closed 2 years ago
Got the same issue. Container runs with user 65534:65534
Run via docker exec -it node-red-container /bin/sh
:
/usr/src/node-red $ id -u
65534
/usr/src/node-red $ id -g
65534
/usr/src/node-red $ npm
/usr/src/node-red $ echo $?
243
What version of docker? The node-red user should be 1000 unless alpine have changed something else
Please supply the full command line of how you are starting Node-RED, including any volumes.
The changes in #324 have not changed the path at all.
Docker version 20.10.17 uid and gid were set by me, I only specified them now because error 243 seems to have something to do with permissions. With version 3.0.0 everything worked without problems.
My docker-compose.yml
:
version: "3.7"
services:
node-red:
image: nodered/node-red:latest-16
restart: unless-stopped
user: "65534:65534"
environment:
- TZ=Europe/Berlin
volumes:
- ./data:/data
Docker version 20.10.14, build a224086
I run unraid so I've just got this container configured via the UI with the basic template, but here's the command that's run after it collects that data:
docker run -d --name='NodeRed-OfficialDocker' --net='bridge' -e TZ="America/Chicago" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Purple" -e HOST_CONTAINERNAME="NodeRed-OfficialDocker" -e 'NODE_RED_ENABLE_SAFE_MODE'='false' -e 'TZ'='America/Chicago' -p '1880:1880/tcp' -v '/mnt/user/appdata/nodered3/':'/data':'rw' --user 99:100 'nodered/node-red:3.0.1'
@hardillb My thinking regarding #324 was at first that it just stopped working after that PR... but so digging in to why that could possibly be, it seems the --cache
flag isn't set explicitly like it was in the old docker entrypoint, but the --userDir
flag is. Do you think this could possibly be related?
nope, it shouldn't be anything to do with the cache as that is only used when installing nodes (not when calling the package.json scripts) it was meaningless in the earlier releases.
I have reproduced this, but it's going to take some playing with.
Also I'm seeing it fail with both 3.0.1 and 3.0.0
OK, I know what the problem is, it is the cache and a lack of home directory.
nope, it shouldn't be anything to do with the cache as that is only used when installing nodes (not when calling the package.json scripts) it was meaningless in the earlier releases.
I have reproduced this, but it's going to take some playing with.
OK, I know what the problem is, it is the cache and a lack of home directory.
I was playing with it the other day and ended up having to add the cache and home dir flags to npm install commands and then it would work. So just need to add a thingy to the dockerfile or the entrypoint to set the flags?
About to board a plane with no space to keep working on this. Will look when I get home.
About to board a plane with no space to keep working on this. Will look when I get home.
Cool beans!
If you can build from source (docker-custom will do) please test this branch
https://github.com/hardillb/node-red-docker/tree/npm-cache-fix
I build from source (using docker-alpine.sh) and it seems like it works now. I updated a module as a test and that worked.
fixed by #327
Docker containers respun and on Docker hub
What are the steps to reproduce?
Download and run nodered/node-red:3.0.1 (I found this issue on the 'latest' tag)
What happens?
Error in console:
Palette editor disabled : npm command not found
and Palette Manager not accessible. Also can't do 'npm install x' commands via docker exec.What do you expect to happen?
Palette Manager to load normally with access to npm. Version 3.0.0 does load the Palette Manager correctly, but I still can't do npm commands via docker exec. Using 3.0.0-14 makes npm usable via the CLI.
Please tell us about your environment:
Linux 5.15.46-Unraid x64 LE, node-red in docker
I do provide the extra docker args
--user 99:100
to my containerLogs:
don't want to point any fingers but https://github.com/node-red/node-red-docker/pull/324 :P