How to start a docker container with a volume attached to the host?

prusso@yoga:~$ sudo docker image ls
REPOSITORY   TAG       IMAGE ID       CREATED          SIZE
<none>       <none>    37275444a35d   46 minutes ago   2.88GB
ubuntu       22.04     5a81c4b8502e   2 weeks ago      77.8MB
prusso@yoga:~$ sudo docker run 37275444a35d --volume Vol
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "--volume": executable file not found in $PATH: unknown.
ERRO[0000] error waiting for container: context canceled 
prusso@yoga:~$ 

So it seems there is some issue but I don’t yet know exactly which type or how to resolve this? Thanks…!

sudo docker run --help

Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Create and run a new container from an image
...

--volume Vol is an OPTION, you used it as COMMAND and ARG instead.

1 Like