This is using the same principle as above. But instead of mounting the volume of another container you will mount a host directory.

This is useful in the sense that it could minimize filesystem overhead and would allow you to safekeep your data in a more traditional way. Another thing to note is, if you wish to use zfs, or another filesystem with no Docker backend, this enables a good compromise.

A possible downside to this approach might be lesser portability of your data.

-e SFTP_DATA_DIR=... (defaults to /data/sftp)This will set the location of a data volume. It is used by the runtime script, to enable the transfer of application data to an empty location. This location could be a data volume container, such as tianon/true, or a location on your host.