Network drive on Nodered Docker

Hi guys,
i couldn't use the network drive(Z) from local pc on the docker container(nodered). Tried by creating a volume for the drive from here

Can someboby plz help with this?

Just saying it does't work, doesn't help, also just pointing to the the documentation again doesn't show us what you actually tried and what the errors you saw.

Explain what you actually tried and how it failed and we might be able to help you fix it.

1 Like

Windows network drives are not real drives.

Lots of info on Stackoverflow for this subject.

1 Like

Looks like this should work:

docker volume create --driver local --opt type=cifs --opt device=//networkdrive-ip/Folder --opt o=user=yourusername,domain=yourdomain,password=yourpassword mydockervolume
1 Like

If it's mounted as a volume it will be accessed by what ever path you mounted it on not z:\

We need to see them docker run command you used to start the container with the volume to say what path you should use


Assuming you have substituted the right bits into the first command that the volume points to the right network share, mounting it to /data in the container in the second command is going to mean that the network share is used to store the Node-RED flows and any nodes you install. It sounds like this is not what you are looking for. You don't want to use it to store the Node-RED state, but to access files on the share.

You should probably mount the volume to somewhere like /mnt then change the path in your flow from z:\somedir\somefile to /mnt/somedir/somefile

I do want to access those files. The log files are constantly updated every second and so copying the file to /mnt won’t be an option for me.

also I did create a volume for the drive but I couldn’t access those files. Saying “no such file or directory”.

I'm not saying copy the files, I'm saying mount the volume on that mountpoint then use the right path to access the file.

You will always get the node such file or directory error if you try to use a path that starts with z:\ because there are no drive letters in Linux and when you run Node-RED in docker it is running in Linux so you have to use Linux file paths.

Oh… okay.

So how would we do that?

I’m really sry if I’m asking too much. Getting stuck!

it's difficult to find a way to help you with the info you provided. It sounds like you're confusing what a vm is, and what a container is... they are very different animals.

Sounds like you're running node-red as a container on a windows host, if that is the case, you should be able to create a volume (see the command on a post above). This volume should be mounted when you start node-red container (share the docker command you're using to start node-red container and we might be able to tell if you've something missing).

The docker is running on a Linux VM with nodered container in it. My main host machine is Windows and that’s why I’m all confused about.

I’m not familiar with Linux so much!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.