How can I access the data on my host inside docker container?

You can start the container with the volume from host mounted in the container by using -v flag.

docker run -v "/path/to/host/directory:/path/inside/container" <image_name>

This maps one directory from host to container. You can make more mappings by using multiple -v flags.

Close Menu