It is good that you are aware of the hazard of greasy rags catching fire. Shop quality greasy rag containers have a spring-loaded top that stays closed. It is worth having one of these, to protect your shop and its contents from a fire hazard.  New ones all seem to cost $80-$120, so you or your insurance company need to decide if the real deal is worth it.  I believe that there is a best practice of not storing anything flammable near such a container.

The linked article suggests that for shops that produce only a small volume of rags, an airtight metal container such as a paint can can serve. To be extra safe, you could fill the container with a mixture of water and detergent.

At home I have been storing greasy rags in a large metal cookie tin, but I see the value of a sturdy paint can with an airtight lid.  Occasionally I hand wash my accumulated shop rags and air dry them for reuse.

https://www.greatamericaninsurancegroup.com/content-hub/news-details/oily-rags-safety#:~:text=For%20somebody%20who%20uses%20oily,with%20a%20tight%2Dfitting%20lid.