I’m running Docker version 17.09.0-ce, build afdb6d4 in an Ubuntu 16.04 LTS VirtualBox VM on a Windows10 host and am struggling to create a volume that is not inside the /var/lib/docker/volumes folder.
Error response from daemon: create /home/frank/mydatavol: "/home/frank/mydatavol" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
root# docker volume create /home/frank/mydatavol/
Error response from daemon: create /home/frank/mydatavol/: "/home/frank/mydatavol/" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
Error response from daemon: create ./home/frank/mydatavol/: "./home/frank/mydatavol/" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
Error response from daemon: create //home/frank/mydatavol/: "//home/frank/mydatavol/" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
Error response from daemon: create /home/frank/mydatavol/: "/home/frank/mydatavol/" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
Same error whatever syntax (also whatever path I have tried, not just home) … error message tells me to provide absolute path, which is what I think I am doing. Any insight appreciated.
Update: As a workaround, creating volume in docker managed area then moving that physical folder to a new location and then placing a symbolic link with pointing to it (same name as the moved folder) seems to satisfy the containers searching for it. Same end result as what I was trying to achieve; not as elegant perhaps.