For just the db files I wouldn’t worry about that. It’d be different if you cached the entire node, which I don’t recommend (I do this myself for some of my nodes, but it’s a do as I say, not as I do situation).
There are instructions here: How to move DB’s to SSD on Docker