The advantage of running docker is that you don't virtualize things => everything is faster (boot time, access files and so on). (assuming you're runing on a Linux machine)
In Virtual Box you have this „Shared Folders” which basically acts the same (I have no idea if/how you can do this via CLI though). But the access to that is done via SMB, so even if everything is local, you'll have some latencies involved.