Save database files to a different location, outside mysql container

I am using Devilbox v1.9.2, and I am trying to configure it to save MySQL Data directory into a different location. I mean, according my review if I rebuild the Mysql container the databases are lost, then I want to know if is posible to indicate a different MySQL Data directory, outisde mysql container, in order to persist the database files.
Please let me know if I am not clear with this description, and thanks for the attention to this message.