Comments (6)
I stumbled upon this while looking for close matches to #109, so here's a docker-compose
snippet that matches the current user by using the UID
environment variable:
node-red:
hostname: flows
image: "nodered/node-red-docker:0.20.5-slim-v10" # https://hub.docker.com/r/nodered/node-red-docker/tags
restart: always
user: ${UID} # this needs to be set so that node-red can match filesystem UIDs
volumes:
- /etc/localtime:/etc/localtime:ro
- /dev/rtc:/dev/rtc:ro
- ${HOME}/.config/node-red:/data
ports:
- "1880:1880"
Hope it's useful.
from node-red-docker.
Sure, you can run docker run -u UID
, for example zero for root
from node-red-docker.
Is there someway to do this with docker compose?
from node-red-docker.
@AnderssonPeter, yes, you can add a user
line in the instance in the docker-compose file: https://medium.com/redbubble/running-a-docker-container-as-a-non-root-user-7d2e00f8ee15
from node-red-docker.
I also had to add the user for NodeRED before I could start nodered on my raspberry pi but a different issue then occurs when I try to install packages:
Unhandled rejection Error: EACCES: permission denied, mkdir '/.npm'
as .npm is a local folder inside the container nodered shouldn't have any issues creating it right?
edit: trying to sudo the folder via shell gives me the error:
sudo: unknown uid 1001: who are you?
temp solution:
#70 (comment)
remove the user from docker-compose and chmod your local data folder to 777
from node-red-docker.
Node-RED 1.0.0 is now available on docker hub - https://hub.docker.com/r/nodered/node-red.
This closes this issue.
There are a few changes to the new release, please read the README for further details.
from node-red-docker.
Related Issues (20)
- No matching manifest for windows/amd64 HOT 2
- NPM fails to install due to running node v14 instead of recommend v16 HOT 6
- TensorFlow nodes can't be installed due to Alpine image incompatibilty HOT 2
- ERROR: failed to solve: process "/bin/sh -c ./known_hosts.sh /etc/ssh/ssh_known_hosts && rm /usr/src/node-red/known_hosts.sh" HOT 8
- Getting errors trying to update Node-red-contrib-bigtimer and node-red-contrib-home-assistant-websocket HOT 13
- latest is actually -16, shouldn't it be -18? HOT 1
- Cannot load external flows for env var FLOWS=http... HOT 1
- Image with Debian and 18 HOT 8
- Crashing on RPi3 armv7l after latest build HOT 8
- docker pull 'missing signature key' HOT 4
- Support Node 20 HOT 4
- Problems accessing the ttyS2 HOT 5
- unhealthy state since v3.0.0 HOT 9
- Docker image with node 18.x core dumped HOT 12
- I'm not able to create mountpath: /data HOT 4
- Cannot install new nodes on fresh Docker image HOT 9
- Node-Red image v3.1.6-18 has CVE-2023-42282 vulnerability HOT 3
- Node-red image has security vulnerabilities HOT 7
- docker-debian.sh always fails because known_hosts.sh fails with "ssh-keyscan failed, no more retries left" HOT 7
- NodeJS Versions need to be updated HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-docker.