I'm new to docker and following through their getting started tutorial in the docs. I'm currently at the part where I need to mount a volume in order to persist data between container reruns. But when I try running the command docker run -dp 3000:3000 --mount type=volume,src=todo-db,target=/etc/todos getting-started
, I get an error response:
docker: Error response from daemon: invalid mount config for type "volume": invalid mount path: 'D:/Program Files/Git/etc/todos' mount path must be absolute.
See 'docker run --help'.
From what I understand, I think the problem comes from the target
parameter for the --mount
flag. The path should be the target path in the container, correct? But for some reason i think it's reading my machine's path of D:/Program Files/Git/etc/todos
. Thank you for the help.