Here’s my docker-compose.yml
file:
version: "3.1"
networks:
lan_access:
driver: bridge
services:
nodejs:
image: node:18
environment:
- VS_ALLOW_ADMIN=true
- VS_ALLOW_CORS=true
- VS_PORT=8000
- VS_VIDEO_SOURCE=/video
- VS_ZIDOO_CONNECT=http://192.168.42.71:9529/
ports:
- "8000:8000"
working_dir: /home/app
restart: always
volumes:
- ./nodejs:/home/app
- "some way to point at my V:\ drive needs to go here":/video
command: ["node", "app.js"]
Everything else seems to be working now, but either I end up with a docker-compose.yml
syntax error, or my /video
drive is empty when the server launches. I need /video
to provide access to everything on my mapped network V:\
drive.
Since I have Docker on Windows running using WSL, I tried mounting my V:\
in WSL as /mnt/v
. WSL sees all of the files on the drive that way, but using /mnt/v
as my volume source didn’t help, unfortunately.
Alternatively, I’ve tried accessing the same files via an SMB (since my V: drive is nothing more than a mapped network drive). No success from that approach yet either.
volumes:
video:
driver_opts:
type: cifs
o: "username=guest,password=guest"
device: "//192.168.42.13/video"
This looks like examples I’ve found (although some examples add user ID arguments and other things to the “o” parameter), but I keep getting this error:
c:\git\docker-nodejs>docker-compose up
[+] Building 0.0s (0/0) docker:default
Attaching to docker-nodejs-nodejs-1
Error response from daemon: error while mounting volume '/var/lib/docker/volumes/docker-nodejs_video/_data': failed to mount local volume: mount 192.168.42.13/video:/var/lib/docker/volumes/docker-nodejs_video/_data, data: username=guest,password=********: invalid argument
I’ve tried a few variations on this (like adding “smb:” to the IP address), but I’m not getting an error about bad credentials or failing to connect. This error sounds like the syntax simply isn’t accepted, and Docker probably hasn’t even come close yet to actually trying to mount the share.