Docker: Unable to mount volume

632 Views Asked by At

I am trying to mount the volume on my customized image.

docker run --rm -v models:/volumes/models <image-name>:latest

or

docker run --rm <image-name>:latest

Its throwing same error for both commands:

docker: Error response from daemon: OCI runtime create failed: invalid mount {Destination:[/volumes/models] Type:bind Source:/mnt/data/docker/volumes/beb849ff1498450a01aa69c9b143e51b15fc8d97316d318cfbd4ab72f60656de/_data Options:[rbind]}: mount destination [/volumes/models] not absolute: unknown.

My Docker version is : Docker version 19.03.13, build 4484c46d9d

To crosscheck the image, I have mounted the same volume on another server and it worked

Am I missing something?

0

There are 0 best solutions below