Backup rasperrypi HA to deploy in docker

I have HA running on a rasperrypi.
I have now learned about docker, and want to install docker on my pi and then deploy my current HA in a docker container.

Can I make a backup of my current HA and easily deploy it in a docker container without losing all my HA settings, integrations, lovelace and so on?

If yes, can someone direct me to the process of how to do this? How to backup my HA so I can restore it in a docker container.

Thank you.