You won’t lose data, it’s in /var/discourse/shared.
If docker works, just rebuild and you’ll be fine.