If you haven’t done much writing to the SD card, you may be able to recover the data. Data isn’t really “deleted”, it is just labeled as deleted. There is software that can comb through the raw data and try to make sense of what files were there. I don’t know of any specific software, so if anyone knows, please reply
Edit: Another commenter mentioned some success with DMDE
Edit 2: Worth mentioning that this is true of formats. As long as it doesn’t zero out the entire media, it just edits the file system metadata to say there are no files.
I use Home Assistant for controlling my smart lights. They do support Docker, but I installed it as a VM with KVM. You get more features with it, such as add-ons. But you should definitely look into your options. They have a diagram on this page.
https://www.home-assistant.io/installation/