You can first create the volume and then start the container or .If you are trying to start a container with a volume that doesn't exist, docker will create a volume for you. Suppose you want to mount a volume (say vol1) into /app/ of the container (say mycontainer1).
You can do this either by using -v or --mount. Here's how you can do it.
$ docker run -d \
--name mycontainer1 \
--mount source=vol1,target=/app \
ubuntu:latest
You can achieve the same using -v instead of --mount as shown below:
$ docker run -d \
--name mycontainer1 \
-v vol1:/app \
ubuntu:latest
Either of these would do!