How to traverse a folder from the container in lokalny folder?

Is it possible when you run to traverse all of the files that is in the container on the local machine?
-v /root/test/root/test deletes the files inside the container (and the container they were there), that is, there is a mapping from local to container. But I need the opposite.

The problem initially is this:
the car has a 1 FTP server on port 21, proftpd, and need to user on port 21 connect to their files. It is important that 1 port and it's different users.
April 19th 20 at 12:40
3 answers
April 19th 20 at 12:42
How to traverse a folder from the container in lokalny folder?

You can't do that.

-v /root/test/root/test deletes the files inside the container

Does not remove, and mounts this way.

P. S. it is Better to describe the problem you want to solve.
The task described in the subject - keanu.Langosh commented on April 19th 20 at 12:45
@keanu.Langosh, to create a volume as a mount point specify the directory the ftp root,
then copy the required files into the container.
On the other way.

If the directories have user sites (or something similar), it is logical everything is stored on the host, and push into the container.
It's easier bekapit, you can share data across multiple containere,
when rebuilding the container data will not be lost. - Shea.Wiza commented on April 19th 20 at 12:48
April 19th 20 at 12:44
I don't understand the problem.

On the surface - you can traverse the folder from the host system into the container to the desired location. The container will see it as his own, and outside it will also be available.

Or make a mount like on the network (with the only difference that the network is virtual, the physical part of the network.
April 19th 20 at 12:46
Take docker-compose, describe the creation of their containers and volumev, create a named volume, when creating the files will be copied from the container to the host and available in the path /var/lib/docker/volumes/name-volume/_data
These same files are available and the inside of the container.
More info in the official Doc: https://docs.docker.com/compose/compose-file/#volumes

Find more questions by tags DockerLinux