Hi everyone, I’m seeking assistance on fetching a directory named ‘images’ from a remote server labeled ‘pc1’ as volumes. The goal is to enable the machine learning process within a Docker container to utilize this directory for read/write operations via Docker Compose. Any insights on achieving this would be greatly appreciated! Thank you!!
Issue:
While executing ‘docker-compose up’, I encountered the following error:
ERROR: for event_analysis_event_analysis_1 Cannot start service event_analysis: error while mounting volume ‘/var/lib/docker/volumes/xyz_data/_data’: failed to mount local volume: mount //IP-Address/data:/var/lib/docker/volumes/xyz_data/_data, flags: 0x1000: no such file or directory
ERROR: for event_analysis Cannot start service event_analysis: error while mounting volume ‘/var/lib/docker/volumes/xyz_data/_data’: failed to mount local volume: mount //IP-Address/data:/var/lib/docker/volumes/xyz_data/_data, flags: 0x1000: no such file or directory
ERROR: Encountered errors while bringing up the project.
Due to this issue, the application is unable to create or write to the specified path.
This can’t be right. It doesn’t make sense to use --opt type=cifs and --opt o=bind at the same time. Remove the volume again, and re-create it without these arguments: --opt o=bind
Other than that, your volume looks good to me. Though the volume name xyz_data and name: key_data do not match. Make sure name: has a name of a volume that actually exists on the docker engine.
However, I encountered an error stating “invalid argument.” Could you please advise on a solution to resolve this issue? Thank you for your assistance.
ERROR: for event_analysis_event_analysis_1 Cannot start service event_analysis: error while mounting volume ‘/var/lib/docker/volumes/xyz_data/_data’: failed to mount local volume: mount //ip-address/data:/var/lib/docker/volumes/xyz_data/_data, data: uid=1025,gid=100,vers=4.0: invalid argument
ERROR: for event_analysis Cannot start service event_analysis: error while mounting volume ‘/var/lib/docker/volumes/xyz_data/_data’: failed to mount local volume: mount //ip-address/data:/var/lib/docker/volumes/xyz_data/_data, data: uid=1025,gid=100,vers=4.0: invalid argument
ERROR: Encountered errors while bringing up the project.
I can’t tell you why it says it is an invalid argument. I never tried to access anonymous cifs shares or vers 4.0 shares at all. I try to avoid using cifs and prefer using nfsv4 instead, as it proven to be more reliable for me.
Have you tried to mount the cifs share on the host using sudo mount -t cifs -o uid=1025,gid=100,vers=4.0 //IP-Address/data /mnt/cifs-test (of course, you need to create /mnt/cifs-test before)? If it’s working from the host, it should work as volume.