mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 16:56:33 +00:00
fix(nodered): install gosu, swap su-exec → gosu (debian base, not alpine)
This commit is contained in:
parent
f087fdc056
commit
eb1ac8245a
2 changed files with 9 additions and 2 deletions
|
|
@ -8,6 +8,12 @@ FROM nodered/node-red:latest
|
|||
|
||||
USER root
|
||||
|
||||
# gosu lets the entrypoint drop from root to node-red after fixing /data
|
||||
# perms. nodered/node-red is Debian-slim based so apt is the right channel.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends gosu \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy our nodes into a path outside /data (which is volume-mounted)
|
||||
COPY nodered /usr/src/betterframe-nodes
|
||||
|
||||
|
|
|
|||
|
|
@ -26,5 +26,6 @@ fi
|
|||
# Ensure the volume + seeded file are owned by node-red.
|
||||
chown -R node-red:root "$DATA" 2>/dev/null || true
|
||||
|
||||
# Drop to the node-red user before launching. The base image ships su-exec.
|
||||
exec su-exec node-red:node-red npm start --cache /data/.npm -- --userDir /data "$@"
|
||||
# Drop to the node-red user before launching. nodered/node-red is Debian
|
||||
# based; we installed gosu in the Dockerfile for this.
|
||||
exec gosu node-red:node-red npm start --cache /data/.npm -- --userDir /data "$@"
|
||||
|
|
|
|||
Loading…
Reference in a new issue