Closed cowchimp closed 5 years ago
@cowchimp, I'll will have a look at it asap. Meanwhile you might want to check out this to build your own Docker image.
@cowchimp, I'll will have a look at it asap.
Thank you!
Meanwhile you might want to check out this to build your own Docker image.
It's okay I'm still using node 0.20 as my main instance. Wanted to experiment with v1.0 and if it works I'll make the switch. It's so easy with Docker to have two versions working side-by-side ✌️
@cowchimp, your finding is correct! Just found out that indeed something is wrong with the owner of /usr/src/node-red/node_modules
- the owner is root:root (0:0) which should be node-red:node-red (1000:1000).
The good news - I fixed locally
Thanks for your discovery, this has great impact on all users!
In latest
images the owner issues has been fixed. For all images the node-red
user has 1000:1000
.
I tested your docker-compose.yml and it works. Make sure you pull the latest image with the following command:
docker pull nodered/node-red:latest-12
For reference the directory listing with owner and permissions:
ls -nalR node-red-test/
node-red-test/:
total 16
drwxrwxr-x 3 1000 100 4096 Oct 2 09:25 .
drwxr-xr-x 7 1000 1000 4096 Oct 2 09:36 ..
-rw-rw-r-- 1 1000 100 107 Oct 2 09:53 docker-compose.yml
drwxrwxr-x 3 1000 100 4096 Oct 2 09:51 nodered1
node-red-test/nodered1:
total 16
drwxrwxr-x 3 1000 100 4096 Oct 2 09:51 .
drwxrwxr-x 3 1000 100 4096 Oct 2 09:25 ..
drwxr-xr-x 3 0 0 4096 Oct 2 09:53 data
-rw-rw-r-- 1 1000 100 77 Oct 2 09:51 Dockerfile
node-red-test/nodered1/data:
total 56
drwxr-xr-x 3 0 0 4096 Oct 2 09:53 .
drwxrwxr-x 3 1000 100 4096 Oct 2 09:51 ..
-rw-r--r-- 1 0 0 10079 Oct 2 09:53 .config.json
-rw-r--r-- 1 0 0 10017 Oct 2 09:53 .config.json.backup
drwxr-xr-x 3 0 0 4096 Oct 2 09:44 lib
-rw-r--r-- 1 0 0 120 Oct 2 09:44 package.json
-rw-r--r-- 1 0 0 12478 Oct 2 09:44 settings.js
node-red-test/nodered1/data/lib:
total 12
drwxr-xr-x 3 0 0 4096 Oct 2 09:44 .
drwxr-xr-x 3 0 0 4096 Oct 2 09:53 ..
drwxr-xr-x 2 0 0 4096 Oct 2 09:44 flows
node-red-test/nodered1/data/lib/flows:
total 8
drwxr-xr-x 2 0 0 4096 Oct 2 09:44 .
drwxr-xr-x 3 0 0 4096 Oct 2 09:44 ..
note if you change the owner on your host dir nodered1/data
to a user with uid and gid 1000
, you would not need to run node-red under root
.
Hope this helps solving your issue.
In latest images the owner issues has been fixed.
Thank you! It now works!
note if you change the owner on your host dir nodered1/data to a user with uid and gid 1000, you would not need to run node-red under root.
I will try this as well. Thanks again.
@cowchimp, glad i could help .. ill close the issue, but feel free to reopen if you need more assistance.
I'm still confused as to howfar this has been "fixed". After upgrading to 1.0 I'm missing the email node and fail to install it:
2019-10-04T14:39:56.683Z Install : node-red-node-email ^0.1.29
2019-10-04T14:39:56.718Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-node-email@^0.1.29
2019-10-04T14:40:00.048Z [err] npm
2019-10-04T14:40:00.048Z [err]
2019-10-04T14:40:00.049Z [err] WARN
2019-10-04T14:40:00.049Z [err]
2019-10-04T14:40:00.049Z [err] deprecated
2019-10-04T14:40:00.049Z [err] nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
2019-10-04T14:40:00.055Z [err] npm
2019-10-04T14:40:00.056Z [err]
2019-10-04T14:40:00.056Z [err] WARN
2019-10-04T14:40:00.056Z [err]
2019-10-04T14:40:00.056Z [err] deprecated
2019-10-04T14:40:00.057Z [err] mailparser@0.6.2: Mailparser versions older than v2.3.0 are deprecated
2019-10-04T14:40:00.556Z [err] npm WARN
2019-10-04T14:40:00.556Z [err] deprecated mimelib@0.3.1: This project is unmaintained
2019-10-04T14:40:01.321Z [err] npm
2019-10-04T14:40:01.321Z [err] WARN deprecated mailcomposer@2.1.0: This project is unmaintained
2019-10-04T14:40:01.601Z [err] npm
2019-10-04T14:40:01.602Z [err] WARN deprecated buildmail@2.0.0: This project is unmaintained
2019-10-04T14:40:02.700Z [err] npm
2019-10-04T14:40:02.700Z [err] WARN checkPermissions Missing write access to /data/node_modules/after
2019-10-04T14:40:02.700Z [err] npm WARN checkPermissions Missing write access to /data/node_modules/arraybuffer.slice
2019-10-04T14:40:02.700Z [err] npm WARN
2019-10-04T14:40:02.700Z [err] checkPermissions Missing write access to /data/node_modules/asn1
2019-10-04T14:40:02.700Z [err] npm
2019-10-04T14:40:02.700Z [err] WARN checkPermissions Missing write access to /data/node_modules/assert-plus
2019-10-04T14:40:02.700Z [err] npm WARN
2019-10-04T14:40:02.700Z [err] checkPermissions Missing write access to /data/node_modules/async-limiter
2019-10-04T14:40:02.700Z [err] npm WARN
2019-10-04T14:40:02.700Z [err] checkPermissions Missing write access to /data/node_modules/asynckit
2019-10-04T14:40:02.700Z [err] npm
2019-10-04T14:40:02.700Z [err] WARN checkPermissions
2019-10-04T14:40:02.700Z [err] Missing write access to /data/node_modules/aws-sign2
This keeps being a problem after upgrading to latest-12
. This is what /data
looks for me:
bash-4.4$ cd /data/
bash-4.4$ ls -l
total 104
drwxrwxrwx 2 root users 4096 Dec 26 2018 @eaDir
-rwxrwxrwx 1 1024 users 736 Dec 10 2017 config.json
-rw-r--r-- 1 1001 1001 24953 Feb 22 2018 flows.json
-rw-r--r-- 1 1001 1001 172 Jan 17 2018 flows_cred.json
drwxr-xr-x 3 1001 1001 4096 Dec 18 2017 lib
drwxr-xr-x 133 1001 1001 4096 Mar 31 2019 node_modules
-rw-r--r-- 1 root root 2929 Nov 5 2018 package-lock.json
-rwxrwxrwx 1 1001 1001 424 Dec 1 2018 package.json
drwxr-xr-x 5 1001 1001 4096 Oct 8 2018 projects
-rwxrwxrwx 1 1024 users 9248 Feb 22 2018 settings.js
I also see a lot on 1001 users instead the atop-mentioned 1000. node_modules
also contains the occasional root
. So how would I fix this?
@andig,
Just to verify, are you trying to create a node-red custom image using the docker-make.sh
?
Before using the image, did you try:
docker pull nodered/node-red:latest-12
Can you please supply the following info?
[ ] Platform/OS:
[ ] Browser:
If you are a Portainer user, please attach a screenshot of your container details.
Containers -> Click on the node-red container -> Scroll to Container Details and take a screenshot
If you are a command line user please execute the following command and attach the log file.
docker inspect <container_id> > container.log
Thank you for looking into this. Here's whats going on, running on Synology NAS. Same command as 0.20 version except for image name:
sudo docker run -p 1880:1880 -v /volume1/data/docker/node-red:/data --name node-red nodered/node-red
Running in foreground gives:
admin@NAS:~$ sudo docker run -p 1880:1880 -v /volume1/data/docker/node-red:/data --name node-red nodered/node-red:latest-12
> node-red-docker@1.0.1 start /usr/src/node-red
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"
5 Oct 09:36:24 - [info]
Welcome to Node-RED
===================
5 Oct 09:36:24 - [info] Node-RED version: v1.0.1
5 Oct 09:36:24 - [info] Node.js version: v12.10.0
5 Oct 09:36:24 - [info] Linux 4.4.59+ x64 LE
5 Oct 09:36:25 - [info] Loading palette nodes
5 Oct 09:36:28 - [info] Dashboard version 2.10.1 started at /ui
5 Oct 09:36:28 - [warn] Missing node modules:
5 Oct 09:36:28 - [warn] - node-red-node-base64 (0.1.3): base64
5 Oct 09:36:28 - [warn] - node-red-node-twitter (1.1.5): twitter-credentials, twitter in, twitter out
5 Oct 09:36:28 - [warn] - node-red-node-feedparser (0.1.14): feedparse
5 Oct 09:36:28 - [warn] - node-red-node-msgpack (1.1.3): msgpack
5 Oct 09:36:28 - [warn] - node-red-node-random (0.1.3): random
5 Oct 09:36:28 - [warn] - node-red-node-sentiment (0.1.4): sentiment
5 Oct 09:36:28 - [warn] - node-red-node-suncalc (0.0.11): sunrise
5 Oct 09:36:28 - [warn] - node-red-node-email (1.6.3): e-mail, e-mail in
5 Oct 09:36:28 - [info] Removing modules from config
5 Oct 09:36:28 - [info] Settings file : /data/settings.js
5 Oct 09:36:28 - [info] Context store : 'default' [module=memory]
5 Oct 09:36:28 - [info] User directory : /data
5 Oct 09:36:28 - [info] Server now running at http://127.0.0.1:1880/
5 Oct 09:36:28 - [info] Active project : ebusd-logging
5 Oct 09:36:28 - [info] Flows file : /data/projects/ebusd-logging/flows.json
5 Oct 09:36:29 - [info] Waiting for missing types to be registered:
5 Oct 09:36:29 - [info] - e-mail (provided by npm module node-red-node-email)
5 Oct 09:36:29 - [info] To install any of these missing modules, run:
5 Oct 09:36:29 - [info] npm install <module name>
5 Oct 09:36:29 - [info] in the directory:
5 Oct 09:36:29 - [info] /data
5 Oct 09:36:57 - [info] Installing module: node-red-node-email, version: ^0.1.29
5 Oct 09:37:02 - [warn] Installation of module node-red-node-email failed:
5 Oct 09:37:02 - [warn] ------------------------------------------
5 Oct 09:37:02 - [warn] npm WARN deprecated nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailparser@0.6.2: Mailparser versions older than v2.3.0 are deprecated
npm WARN deprecated mimelib@0.3.1: This project is unmaintained
npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained
npm WARN deprecated buildmail@2.0.0: This project is unmaintained
npm WARN checkPermissions Missing write access to /data/node_modules/after
npm WARN checkPermissions Missing write access to /data/node_modules/arraybuffer.slice
npm WARN checkPermissions Missing write access to /data/node_modules/asn1
npm WARN checkPermissions Missing write access to /data/node_modules/assert-plus
npm WARN checkPermissions Missing write access to /data/node_modules/async-limiter
npm WARN checkPermissions Missing write access to /data/node_modules/asynckit
npm WARN checkPermissions Missing write access to /data/node_modules/aws-sign2
npm WARN checkPermissions Missing write access to /data/node_modules/aws4
npm WARN checkPermissions Missing write access to /data/node_modules/backo2
npm WARN checkPermissions Missing write access to /data/node_modules/base64-arraybuffer
npm WARN checkPermissions Missing write access to /data/node_modules/base64id
npm WARN checkPermissions Missing write access to /data/node_modules/blob
npm WARN checkPermissions Missing write access to /data/node_modules/buffer-equal-constant-time
npm WARN checkPermissions Missing write access to /data/node_modules/callsite
npm WARN checkPermissions Missing write access to /data/node_modules/better-assert
npm WARN checkPermissions Missing write access to /data/node_modules/caseless
npm WARN checkPermissions Missing write access to /data/node_modules/co
npm WARN checkPermissions Missing write access to /data/node_modules/component-bind
npm WARN checkPermissions Missing write access to /data/node_modules/component-emitter
npm WARN checkPermissions Missing write access to /data/node_modules/component-inherit
npm WARN checkPermissions Missing write access to /data/node_modules/cookie
npm WARN checkPermissions Missing write access to /data/node_modules/dashdash
npm WARN checkPermissions Missing write access to /data/node_modules/delayed-stream
npm WARN checkPermissions Missing write access to /data/node_modules/combined-stream
npm WARN checkPermissions Missing write access to /data/node_modules/depd
npm WARN checkPermissions Missing write access to /data/node_modules/destroy
npm WARN checkPermissions Missing write access to /data/node_modules/ee-first
npm WARN checkPermissions Missing write access to /data/node_modules/encodeurl
npm WARN checkPermissions Missing write access to /data/node_modules/engine.io-client/node_modules/debug
npm WARN checkPermissions Missing write access to /data/node_modules/engine.io/node_modules/debug
npm WARN checkPermissions Missing write access to /data/node_modules/escape-html
npm WARN checkPermissions Missing write access to /data/node_modules/etag
npm WARN checkPermissions Missing write access to /data/node_modules/extsprintf
npm WARN checkPermissions Missing write access to /data/node_modules/fast-deep-equal
npm WARN checkPermissions Missing write access to /data/node_modules/fast-json-stable-stringify
npm WARN checkPermissions Missing write access to /data/node_modules/forever-agent
npm WARN checkPermissions Missing write access to /data/node_modules/fresh
npm WARN checkPermissions Missing write access to /data/node_modules/getpass
npm WARN checkPermissions Missing write access to /data/node_modules/har-schema
npm WARN checkPermissions Missing write access to /data/node_modules/has-binary2
npm WARN checkPermissions Missing write access to /data/node_modules/engine.io-parser
npm WARN checkPermissions Missing write access to /data/node_modules/has-cors
npm WARN checkPermissions Missing write access to /data/node_modules/indexof
npm WARN checkPermissions Missing write access to /data/node_modules/inherits
npm WARN checkPermissions Missing write access to /data/node_modules/is-json
npm WARN checkPermissions Missing write access to /data/node_modules/is-typedarray
npm WARN checkPermissions Missing write access to /data/node_modules/isarray
npm WARN checkPermissions Missing write access to /data/node_modules/jsbn
npm WARN checkPermissions Missing write access to /data/node_modules/ecc-jsbn
npm WARN checkPermissions Missing write access to /data/node_modules/json-easy-filter
npm WARN checkPermissions Missing write access to /data/node_modules/json-schema
npm WARN checkPermissions Missing write access to /data/node_modules/json-schema-traverse
npm WARN checkPermissions Missing write access to /data/node_modules/ajv
npm WARN checkPermissions Missing write access to /data/node_modules/har-validator
npm WARN checkPermissions Missing write access to /data/node_modules/json-stringify-safe
npm WARN checkPermissions Missing write access to /data/node_modules/jsonwebtoken/node_modules/ms
npm WARN checkPermissions Missing write access to /data/node_modules/lodash.includes
npm WARN checkPermissions Missing write access to /data/node_modules/lodash.isboolean
npm WARN checkPermissions Missing write access to /data/node_modules/lodash.isinteger
npm WARN checkPermissions Missing write access to /data/node_modules/lodash.isnumber
npm WARN checkPermissions Missing write access to /data/node_modules/lodash.isplainobject
npm WARN checkPermissions Missing write access to /data/node_modules/lodash.isstring
npm WARN checkPermissions Missing write access to /data/node_modules/lodash.once
npm WARN checkPermissions Missing write access to /data/node_modules/mime
npm WARN checkPermissions Missing write access to /data/node_modules/mime-db
npm WARN checkPermissions Missing write access to /data/node_modules/mime-types
npm WARN checkPermissions Missing write access to /data/node_modules/form-data
npm WARN checkPermissions Missing write access to /data/node_modules/negotiator
npm WARN checkPermissions Missing write access to /data/node_modules/accepts
npm WARN checkPermissions Missing write access to /data/node_modules/oauth-sign
npm WARN checkPermissions Missing write access to /data/node_modules/object-component
npm WARN checkPermissions Missing write access to /data/node_modules/on-finished
npm WARN checkPermissions Missing write access to /data/node_modules/parseqs
npm WARN checkPermissions Missing write access to /data/node_modules/parseuri
npm WARN checkPermissions Missing write access to /data/node_modules/parseurl
npm WARN checkPermissions Missing write access to /data/node_modules/performance-now
npm WARN checkPermissions Missing write access to /data/node_modules/psl
npm WARN checkPermissions Missing write access to /data/node_modules/punycode
npm WARN checkPermissions Missing write access to /data/node_modules/qs
npm WARN checkPermissions Missing write access to /data/node_modules/range-parser
npm WARN checkPermissions Missing write access to /data/node_modules/safe-buffer
npm WARN checkPermissions Missing write access to /data/node_modules/ecdsa-sig-formatter
npm WARN checkPermissions Missing write access to /data/node_modules/jwa
npm WARN checkPermissions Missing write access to /data/node_modules/jws
npm WARN checkPermissions Missing write access to /data/node_modules/setprototypeof
npm WARN checkPermissions Missing write access to /data/node_modules/socket.io-adapter
npm WARN checkPermissions Missing write access to /data/node_modules/socket.io-client/node_modules/debug
npm WARN checkPermissions Missing write access to /data/node_modules/socket.io-parser/node_modules/debug
npm WARN checkPermissions Missing write access to /data/node_modules/socket.io-parser
npm WARN checkPermissions Missing write access to /data/node_modules/socket.io/node_modules/debug
npm WARN checkPermissions Missing write access to /data/node_modules/statuses
npm WARN checkPermissions Missing write access to /data/node_modules/http-errors
npm WARN checkPermissions Missing write access to /data/node_modules/send
npm WARN checkPermissions Missing write access to /data/node_modules/serve-static
npm WARN checkPermissions Missing write access to /data/node_modules/to-array
npm WARN checkPermissions Missing write access to /data/node_modules/tough-cookie
npm WARN checkPermissions Missing write access to /data/node_modules/tunnel-agent
npm WARN checkPermissions Missing write access to /data/node_modules/tweetnacl
npm WARN checkPermissions Missing write access to /data/node_modules/bcrypt-pbkdf
npm WARN checkPermissions Missing write access to /data/node_modules/sshpk
npm WARN checkPermissions Missing write access to /data/node_modules/ultron
npm WARN checkPermissions Missing write access to /data/node_modules/uuid
npm WARN checkPermissions Missing write access to /data/node_modules/verror
npm WARN checkPermissions Missing write access to /data/node_modules/jsprim
npm WARN checkPermissions Missing write access to /data/node_modules/http-signature
npm WARN checkPermissions Missing write access to /data/node_modules/ws
npm WARN checkPermissions Missing write access to /data/node_modules/engine.io
npm WARN checkPermissions Missing write access to /data/node_modules/xmlhttprequest-ssl
npm WARN checkPermissions Missing write access to /data/node_modules/yeast
npm WARN checkPermissions Missing write access to /data/node_modules/engine.io-client
npm WARN checkPermissions Missing write access to /data/node_modules/socket.io-client
npm WARN checkPermissions Missing write access to /data/node_modules/socket.io
npm WARN checkPermissions Missing write access to /data/node_modules/jsonwebtoken
npm WARN checkPermissions Missing write access to /data/node_modules/node-red-contrib-data-mapper
npm WARN checkPermissions Missing write access to /data/node_modules/node-red-contrib-mapper
npm WARN checkPermissions Missing write access to /data/node_modules/node-red-contrib-volkszaehler
npm WARN checkPermissions Missing write access to /data/node_modules/node-red-dashboard
npm WARN checkPermissions Missing write access to /data/node_modules/request
npm WARN checkPermissions Missing write access to /data/node_modules
npm WARN checkPermissions Missing write access to /data/node_modules/engine.io-client/node_modules
npm WARN checkPermissions Missing write access to /data/node_modules/engine.io/node_modules
npm WARN checkPermissions Missing write access to /data/node_modules/jsonwebtoken/node_modules
npm WARN checkPermissions Missing write access to /data/node_modules/socket.io-client/node_modules
npm WARN checkPermissions Missing write access to /data/node_modules/socket.io-parser/node_modules
npm WARN checkPermissions Missing write access to /data/node_modules/socket.io/node_modules
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /data/node_modules/after
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/data/node_modules/after'
npm ERR! [Error: EACCES: permission denied, access '/data/node_modules/after'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/data/node_modules/after'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/data/node_modules/after'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /usr/src/node-red/.npm/_logs/2019-10-05T09_37_02_965Z-debug.log
5 Oct 09:37:02 - [warn] ------------------------------------------
Inspect:
[
{
"Id": "481f4748bc7514477f6ea7f82ecdd2b926f6800f5a1c03b5e511e7a83d31dfcb",
"Created": "2019-10-05T09:36:18.955512522Z",
"Path": "npm",
"Args": [
"start",
"--",
"--userDir",
"/data"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 6237,
"ExitCode": 0,
"Error": "",
"StartedAt": "2019-10-05T09:36:20.027498595Z",
"FinishedAt": "0001-01-01T00:00:00Z",
"StartedTs": 1570268180,
"FinishedTs": -62135596800
},
"Image": "sha256:4602cad7352e99c205c74c229b789546b7e7d0cc01ef45b6a28015f5b8bb87a8",
"ResolvConfPath": "/volume1/@docker/containers/481f4748bc7514477f6ea7f82ecdd2b926f6800f5a1c03b5e511e7a83d31dfcb/resolv.conf",
"HostnamePath": "/volume1/@docker/containers/481f4748bc7514477f6ea7f82ecdd2b926f6800f5a1c03b5e511e7a83d31dfcb/hostname",
"HostsPath": "/volume1/@docker/containers/481f4748bc7514477f6ea7f82ecdd2b926f6800f5a1c03b5e511e7a83d31dfcb/hosts",
"LogPath": "/volume1/@docker/containers/481f4748bc7514477f6ea7f82ecdd2b926f6800f5a1c03b5e511e7a83d31dfcb/log.db",
"Name": "/node-red",
"RestartCount": 0,
"Driver": "aufs",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/volume1/data/docker/node-red:/data"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "db",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"1880/tcp": [
{
"HostIp": "",
"HostPort": "1880"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NODE_VERSION=12.10.0",
"YARN_VERSION=1.17.3",
"NODE_RED_VERSION=v1.0.1",
"NODE_PATH=/usr/src/node-red/node_modules:/data/node_modules",
"FLOWS=flows.json"
],
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": null,
"Name": "aufs"
},
"Mounts": [
{
"Type": "bind",
"Source": "/volume1/data/docker/node-red",
"Destination": "/data",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
],
"Config": {
"Hostname": "481f4748bc75",
"Domainname": "",
"User": "node-red",
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"ExposedPorts": {
"1880/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NODE_VERSION=12.10.0",
"YARN_VERSION=1.17.3",
"NODE_RED_VERSION=v1.0.1",
"NODE_PATH=/usr/src/node-red/node_modules:/data/node_modules",
"FLOWS=flows.json"
],
"Cmd": null,
"ArgsEscaped": true,
"Image": "nodered/node-red:latest-12",
"Volumes": {
"/data": {}
},
"WorkingDir": "/usr/src/node-red",
"Entrypoint": [
"npm",
"start",
"--",
"--userDir",
"/data"
],
"OnBuild": null,
"Labels": {
"authors": "Dave Conway-Jones, Nick O'Leary, James Thomas, Raymond Mouthaan",
"org.label-schema.arch": "amd64",
"org.label-schema.build-date": "2019-10-04T14:38:53Z",
"org.label-schema.description": "Low-code programming for event-driven applications.",
"org.label-schema.docker.dockerfile": ".docker/Dockerfile.alpine",
"org.label-schema.license": "Apache-2.0",
"org.label-schema.name": "Node-RED",
"org.label-schema.url": "https://nodered.org",
"org.label-schema.vcs-ref": "0a6d7c7b442b0727454781d4f91bfd5725aefa6c",
"org.label-schema.vcs-type": "Git",
"org.label-schema.vcs-url": "https://github.com/node-red/node-red-docker",
"org.label-schema.version": "1.0.1"
},
"DDSM": false
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "fe6267f4ab9eafeb11dbaa693226ab32b82fe023f7e07af73b1a1397b4ffd474",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"1880/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1880"
}
]
},
"SandboxKey": "/var/run/docker/netns/fe6267f4ab9e",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "a011936a4d6f9f7b33e2ae04ed3522e2c7f67dd85e5e390ef34284c486a2f754",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "45c4ac52488da235e4fe776d3eb7dea19b76d0a6c40aaac16450a26d86073e9d",
"EndpointID": "a011936a4d6f9f7b33e2ae04ed3522e2c7f67dd85e5e390ef34284c486a2f754",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02",
"DriverOpts": null
}
}
}
}
]
@andig, meet me here and i'll help you out with this issue.
Hi. I'm using node-red with Docker, and I need to use a few 3rd-party node-red packages.
Prior to node-red v1, I accomplished this with a Dockerfile that uses the official node-red image as the base image, and then runs a few
npm install
commands.Now I tried this approach with node-red v1 and the new docker images based on the multi-step architecture, and it fails due to a file access permissions issue. It worth noting that this way of accomplishing this goal is recommended in the README (https://github.com/node-red/node-red-docker/blob/343960941097a91dd19ee78761c3095b40b34767/README.md#building-custom-image)
What are the steps to reproduce?
/nodered1
I use
docker-compose
so it looks like this:What happens?
Image creation fails with
Error: EACCES: permission denied, access '/usr/src/node-red/node_modules'
See complete log
``` Building nodered1 Step 1/2 : FROM nodered/node-red:1.0.0-12 ---> a0f7996d5e07 Step 2/2 : RUN npm install node-red-contrib-flightaware ---> Running in 97a5181c363f npm WARN checkPermissions Missing write access to /usr/src/node-red/node_modules npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/src/node-red/node_modules npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/src/node-red/node_modules' npm ERR! [Error: EACCES: permission denied, access '/usr/src/node-red/node_modules'] { npm ERR! stack: "Error: EACCES: permission denied, access '/usr/src/node-red/node_modules'", npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/src/node-red/node_modules' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! /usr/src/node-red/.npm/_logs/2019-09-30T19_47_07_807Z-debug.log ```What do you expect to happen?
That the 3rd-party packages will be added successfully and the image will be created successfully.
Please tell us about your environment: