我是用猫盘上的portainer装的,装好后进入有这样一个警告。
Node
"3cc11d24.ff01a2"
Type comment
Unfold
WARNING: please check you have started this container with a volume that is mounted to /data\n otherwise any flow changes are lost when you redeploy or upgrade the container\n (eg upgrade to a more recent node-red docker image).\ n If you are using named volumes you can ignore this warning.\n Double click or see info side panel to learn how to start Node-RED in Docker to save your work
To start docker with a bind mount volume (-v option), for example:
docker run -it -p 1880:1880 -v /home/user/node_red_data:/data --name mynodered nodered/node-red
where /home/user/node_red_data is a directory on your host machine where you want to store your flows.
If you do not do this then you can experiment and redploy flows, but if you restart or upgrade the container the flows will be disconnected and lost.
They will still exist in a hidden data volume, which can be recovered using standard docker techniques, but that is much more complex than just starting with a named volume as described above.