Docker Community Forums

Share and learn in the Docker community.

Do I need to first manually create directories on the host?

Getting ready to use Docker for the very first time and install a container. The container has parameters. One of following parameters is:

-v path to data:/config \

I assume that I need to first manually create the “path to data” directories on the host first?

Actually docker creates the host and container directories if they don’t exist. Which you can see if you run for example docker run -it --rm -v /tmp/busybox:/data busybox.

1 Like



The way its used in your example, is by using a volume instead of a bind mount (where you mount a path on the host)