I am following Bret Fisher's docker course and I got this assignment. I am running on windows and created 3 virtual nodes with docker-machine. All three nodes are connected in a swarm (2 managers, 1 worker). I am trying to run the following command:
docker service create --network backend --mount type=volume,source=db-data,target=/var/lib/postgresql/data --name db -e POSTGRES_HOST_AUTH_METHOD=trust postgres:9.4
when I run in powershell, It works fine. When I try to run it in GitBash or cmder I get the error:
invalid mount target, must be an absolute path <the path of cli in used>
I tried to change the target to:
- different paths
pwd/ $pwd / $(pwd) / ${pwd}
wsl wslpath $(pwd)
p.s. When I run the stack example of the same code, it does run in GitBash/ Cmder and powershell.
Did you try quoting the mount value?